news feed from facebook wall to a android app

江枫思渺然 提交于 2019-12-03 09:06:17
Sahil Mittal

Of course, you can. First of all, if you are new to facebook integration- read the basics of the android integration, login/authorization calling its APIs etc. (not complex at all).

Facebook provides many APIs (for different functions) that uses the access token.

Based on your requirement, you just need to use the API: /PAGE_ID/feed with the page access token to get the feeds of your page. The page access_token can be obtained with the API: me/accounts?fields=access_token,name (Demo) after the user authorization/login.

You can test this API here: Graph API Explorer, using the default token already present there.


Smarter way

(Without using the facebook API)

Since your requirement involves only back-end processes, you can use this method.

  1. First of all, get the Long-lived page access token (that never expires). Detailed steps here. You can use the short-lived token from here.

  2. Use this token and make a \GET request to :

    https://graph.facebook.com/PAGE_ID/feed?access_token=TOKEN_FROM_STEP_1

    (You can check the result in the browser)

This is it!

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