简体   繁体   English

如何访问用户在Facebook应用中发布的留言墙

[英]How do I access wall posts made by the user in a facebook app

i am having trouble accessing the wall of a user. 我在接触用户壁时遇到麻烦。 I am making a request to 'https://graph.facebook.com/'.$userID.'me/feed?access_token='.$access_token 我正在请求'https://graph.facebook.com/'.$userID.'me/feed?access_token='.$access_token

where $access_token contains my access_token. 其中$ access_token包含我的access_token。

the strange part is that it is working well when I make the request from the application page... that is: http://apps.facebook.com/myapplication/ but when i make the same request in my callback script, it returns only those posts which are made by some application, and it does not show user's own posts like, status messages etc. 奇怪的是,当我从应用程序页面发出请求时,它运行良好……即: http : //apps.facebook.com/myapplication/,但是当我在回调脚本中提出相同的请求时,它返回仅显示由某些应用程序发布的帖子,并且不会显示用户自己的帖子,例如状态消息等。

Try using the new PHP SDK , i've seen people solving bugs like yours just by changing to the SDK. 尝试使用新的PHP SDK ,我已经看到人们只需更改为SDK就可以解决像您这样的错误。 It usually doesn't require you to pass the access token and supports all methods of the API (i think). 它通常不需要您传递访问令牌,并且支持API的所有方法(我认为)。

With /me/feed you can access the feed of the currently logged in user. 使用/ me / feed,您可以访问当前登录用户的feed。 To get the feed of some other user, you need to use their id. 要获取其他用户的供稿,您需要使用其ID。 I am assuming that's the reason why its working in the application page and not in the script. 我假设这就是它在应用程序页面而不是脚本中起作用的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM