I want to ready ONLY public Posts and User's profiles of those Posts from Facebook using Graph (search) API.
And I am little confused over which access token I need , do I need User Access Token or Application Access Token ?
My application is Java based console/desktop application and I am using RestFB.
Please guide me here to how to get my required information and most importantly if I require a User Access Token , then how can I automate this process in my application using RestFB (or any other Java Facebook lib)?
Please note that this is a console application (will run on server) not a client application so what I can do is to create a dummy facebook user account and generate User Access Token using that dummy account.
Thanks, Tony
Try read the documentation about tokens, you have four types of tokens. See what suits best for you.
You can read a more detailed info of each token here https://developers.facebook.com/docs/facebook-login/access-tokens/
If this is much complex for you, you can get the public posts of pages using rss feed. You either can have a xml or a json format.
XML
https://www.facebook.com/feeds/page.php?id=PAGE_ID&format=rss20
JSON
https://www.facebook.com/feeds/page.php?id=PAGE_ID&format=json
Where the PAGE_ID is the id of the page you desire, for example this two urls give you the public posts of John Frusciante's page
XML -> https://www.facebook.com/feeds/page.php?id=122854921087972&format=rss20
JSON -> https://www.facebook.com/feeds/page.php?id=122854921087972&format=json