1

基本上,我们使用 facebook 注册 API 进行网站用户注册,并且我们使用访问令牌将用户数据存储在我们的数据库中,在注册时,我们希望用户允许我们发布墙帖权限。那么我们将做什么..?

这是我们用来尝试启动对话框弹出窗口的代码:

<iframe src="facebook.com/plugins/… echo $redirect_uri;?>&       &cope=publish_stream,offline_access&fields=[ {'name':'name'},
{'name':'first_name'}, {'name':'last_name'}, {'name':'email'}, {'name':'gender'},     
{'name':'birthday'}, {'name':'password'} 
]"scrolling="auto"frameborder="no"style="border:none"allowTransparency="tru‌e"   
width="570"height="800"> </iframe>
4

1 回答 1

0

Your token is granted only for the permissions you specifically requested when you requested the the application be authorized by the user. To be able to post to a users wall, you need to ask the user to authorize the appropriate permissions.

Here is the facebook reference for requesting these permissions:

https://developers.facebook.com/docs/facebook-login/permissions/#adding

Depending on your app, you'll need to ask for either/both publish_actions or publish_stream when you get initial authentication from the user.

于 2013-09-10T04:24:11.787 回答