This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Library to Integrate Facebook login with Play Framework?
I use playframework to make Json/Rest services - no webinterface.
I want to make a service, which posts a message on a Facebook wall.
I had a look at fbconnect and fbgraph, but they seem to only support webinterface.
Am I right ?
Of course, I can just access the Facebook graph API directly, but I would like to know if there are better ways. Later I want to do a lot more with the graph api.
If you want to post to any user's wall you will need the OAuth dialog in order to FB grant access to your app on the user's wall, at least for the first time.
If you are posting to your system's wall then you can get the access token's for your application and store it somewhere.
Related
This question already has answers here:
Facebook Graph API v2.0+ - /me/friends returns empty, or only friends who also use my application
(8 answers)
Closed 8 years ago.
I am developing an application in which the user will be logged in using Facebook credentials.
Once the user is logged in I need to retrieve the user's friends list. But as per new Facebook Graph API version 2.0,I cant get the list of friends until the user's friends logs in to the application.
Is there any possibility to take the user's friends list without user's friends logging in to the application.
If the user cant get the friends list, how come he can invite his friends to the application and asks his permission to retrieve his details? Is there any other way to do this?
Is it possible to fetch the entire friends list of a user by using FQL. If so will it affect the app in the future?
I am new to facebook apps.Please help me to solve this. Thanks in advance.
If you are a canvas game you can use invitable_friends ( https://developers.facebook.com/docs/games/invitable-friends/v2.0 ). Otherwise you can use the Share or Send/Message dialogs.
This question already has an answer here:
Get Facebook User Id of my website visitors w/o auth
(1 answer)
Closed 4 years ago.
Is there any way to take the facebook user-id of a website visitor and save the user-id to a text file to keep track of visitors. I know there is some ways using Facebooks API, but it seems like the user have to give permission, and that is not what we want. So any way to save the facebook user-id of a website visitor without any user interaction?
Simply put: you can't. This would be a huge privacy/security issue IMO. You need explicit permission from the user to get his ID on your own website.
This question already has an answer here:
How can I use the Facebook Javascript API to automatically make a user like a page?
(1 answer)
Closed 9 years ago.
I've been googling for days. I have a read a lot of documentation, forums etc, but I haven't found a working solution.
I am trying to add 'like' to the page https://www.facebook.com/Superawesometest on behalf of the user after he/she has logged in via facebook. I recieve all the necessarry permissions and an access_token.
but using $facebook->api("/Superawesometest/likes", 'post'); wouldn't work
what am I doing wrong?
Try using the Superawesometest page's Page ID instead of the name "Superawesometest" in the API path
This question already has answers here:
How to display my photo albums and photos that are in FB on my own website
(6 answers)
Closed 9 years ago.
I'm trying to show my albums from Facebook on my website using Graph API or FQL, but all the examples I find are to access the photo albums of my visitors.
Can anyone guide me in how to connect to my Facebook account and check my albums for visitors to my site to see my photos?
I am not going to feed you the codes, but what you should do is, run the Oauth script at backend where user has no access to, get the accesstoken which is then used for the main site to fetch the required details.
It is inshort hardcoding (or accessing from a db/file) the access_token instead of generating it by authorizing the visitor which shows their details.
Once you have the image links, you only have to update the new ones. You should code the site such a way to avoid unwanted queries.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Post on a Facebook wall as Page, not as user
Can facebook apps publish on behalf of pages like they do with user statuses?
You most certainly can! Just be sure to use the appropriate access_token. You'll need to authenticate as a page to get this. The documentation explains it best but basically, the administrator of the page must first grant the application the manage_pages permission, once you have this permission, your application will be able to make an API call to /me/accounts to get a list of all the pages that user administers and their appropriate access tokens.
With your shiny new page access token, making calls to the API is just the same as it would be for a user -
https://graph.facebook.com/PAGE_ID/feed?access_token=PAGE_ACCESS_TOKEN&message=Hello Page World!
As effective from October 3, Facebook has changed some rules because of many "spamming" apps, phasing out some of previous privilages. Currently there are very limited resources/tutorials explaining this in detail but better you can check facebook API.
https://developers.facebook.com/roadmap/completed-changes/
https://developers.facebook.com/blog/post/2012/07/05/platform-updates--operation-developer-love/