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?
Tap in the top right of Facebook. Scroll down and tap Most Recent. Learn the difference between top posts and most recent posts in Feed.
After clicking on the Feed tab, users will be able to toggle over to a chronological presentation of their Facebook favorites, Facebook groups they have joined or feeds consisting exclusively of posts from all their Facebook friends in the order they were shared.
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.
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.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With