user2730344
user2730344

Reputation: 61

news feed from facebook wall to a android app

There is any way to get the last post's made on a facebook wall into a Android app? I want to make some like a RSS reader to get some information on the app.

To explain better-

I have a page on facebook about one football club and there I post several information about news, games etc. Now I have made an android app and my question is whether I can import the post into the android application?

Upvotes: 5

Views: 14804

Answers (1)

Sahil Mittal
Sahil Mittal

Reputation: 20753

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!

Upvotes: 15

Related Questions