Read Public Timeline from Facebook

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 10:28:51

问题


I am new on iOS Facebook sdk. I am using version version 3.1.1. I can reach my profile's information via sdk. But I am wondering How can I access and read from other user's public timeline? I search on web but I couldn't find anything. Thanks for answers


回答1:


All roads lead to Rome.

You can find other users' IDs by many ways on quite any API objects (likes and comments from photos and posts of friends or pages).

Example of a request that gets many users, from a Facebook page post:

https://graph.facebook.com/20531316728_107148006126775?fields=likes.fields(id)




回答2:


At Facebook, you have a USER_ID and an alias. You can get the alias by accessing their public profile. For example- https://www.facebook.com/shireesh.asthana which gives you the alias shireesh.asthana

Now you can get the actual User_Id by going to:

https://graph.facebook.com/shireesh.asthana

which gives you my User_id as 631951716

Now you can just do a GET request on 631951716/feed which will help you get the posts of that user(which of course you can see as a non friend).

Hope that helps!



来源:https://stackoverflow.com/questions/14177292/read-public-timeline-from-facebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!