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
Related
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 answers here:
'Like' a page using Facebook Graph API
(6 answers)
Closed 9 years ago.
I want to display a Facebook like button on my webpage.
I am using plugin/likes.php Facebook script
I know user access_token.
I want the like button to work without user authentication.
Is there a way to give access_token directly to like button ?
Thanks
No, the like button login auth has nothing to do with you. When they try to like the object, Facebook will check to see if they are logged into Facebook in that current browser. Unless the user has authorized your application, what you are wanting to do is not possible.
However, if they have logged into your app, and you have the access_token, you can publish an Open Graph action of the built-in type like once they click that button. You can read about how to do that in these docs.
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 11 years ago.
Possible Duplicate:
'Like' a page using facebook graph api
Can we able to like a page via facebbok API. I found method to like a post throught API, but I found nothing in the documentation.
Just go to this site [vist] http://developers.facebook.com/docs/reference/plugins/like/ and take down the code that you need.
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.