Am working on an application that should be able to write unto the wall of a friend after the user authorizes it. Currently, i can write unto my wall successfully through the application using the facebook graph API. Am facing difficulty in writing to a friends wall using the app. I have not been able to figure out whether i need extra permissions to do so or if need to do something different. I would be grateful if anyone could help me with any lead.
Thanks.
You have to get an extended permissions for your app: publish_stream.
For reference see: http://developers.facebook.com/docs/authentication/permissions/
publish_stream - Enables your app to post content, comments, and likes to a user's stream and to the streams of the user's friends...
Good luck
Related
I need to be able to consolidate all the likes from users that use my Facebook app into an Excel or .csv file. I can have the user authenticate within my Facebook app, but is there a way to see the likes for all users of an app using Open Graph or some other Facebook tool? I'm certain that someone else must have had this problem, and I'm hoping that one of you can help me out!
I've been trying to run FQL queries to bring up likes, but don't have any experience with PHP so it has been miserable so far. Any ideas?
There's no way to retrieve a list of users of your app - you'll need to manually build that as users authorise the app see this question for more information
Assuming you have permission to access a user's likes connection - access /USER_ID/likes and parse the response, saving it to a file in accordance with whatever language you're using's syntax (google is your friend here)
Note that your use of the data is subject to Facebook's policies and user's consent in accordance with your privacy policy and sharing it with third parties may be illegal (i am not a lawyer, this is not official advice, etc etc)
Here is the problem with that the application type does not have a like connection. Application Object GraphAPI This is inconvenient when you are looking to gather data on the users that like it.
OR were you talking about the likes endpoint of the user object? That you can gather but I dont think it is what you are looking for. It is shown here Graph Explorer Example - user's likes
I have to check in my script if a user like a facebook page.
I would realize it without Facebook app. I would not create it.
I founded some examples, but they require a Facebook app, and that user gives it the correct permission.
Can you help me? Is it possible?
Thanks for any suggestion.
You need to use the Facebook API and ask for permission from the user to do this.
Resources:
Facebook API info
User info
If your application is an external website, then you need to use the Facebook API and ask for the user_likes permission + valid access and make a POST to USER_ID/likes/PAGE_ID
If your application is a canvas or a tab application, then you can use the signed_request parameters that Facebook send you.
https://developers.facebook.com/docs/howtos/login/signed-request/
https://developers.facebook.com/docs/reference/api/user/
Regards
I am developing a Facebook application, and I am trying to publish the users' activites in my application in the user's wall, like when the user comments on post, the story feedback appears in his wall and is available to his friends to see
I have read these tutorials:
https://developers.facebook.com/docs/opengraph/tutorial/
As well as the following threads:
How to publish Actions to Facebook Graph API with parameters in call URL
Facebook- Publishing a story to user's wall
I am confused about which one I should follow because openGraph seems a bit complicated to implement....so what is the best practice to achieve my requirement?
If you want to post activities on users wall, open graph is preferred way and you will get large distribution(marketing) also.
You can use the PHP Official sdk from facebook, which makes you job easier.
To post open graph actions, you should take publish_actions extended permission from user.
or
You can post on user's wall using /me/feed method requires [publish_stream][3] extended permission.
SDK tutorial
https://developers.facebook.com/docs/reference/php/
Open graph sample application
Download Social Cafe app and see their code
https://developers.facebook.com/docs/opengraph/samples/
You can use Javascript SDK as well, and sometimes that is actually getting better. For example, recently Facebook enforces that users have to read for at least 10 seconds before the app publishes news:Read. These are the usecases that can be handled very efficiently with javascript sdk and jquery (or similar client-side technology).
As for April 2018,
The publish_actions permission is no longer available.
Im kind of new in facebook development, so be patient with me :)
I'm creating an app that manage the photo albums user. One of the features i'm developing needs to access the friends photos. I mean, the photos that my app user can see of his friends. How can retrieve thats albums and photos information? I have user_photos and friends_photos permission.
Any sugestion?
Thanks in advance!!
Sorry for my lame english. Is not my native language.
Sebastian
You need to make an API call, for this you can use Facebook Graph API.
Look at the following API for albums
http://developers.facebook.com/docs/reference/api/album/
This is for generic purpose, however you need to first pull all the friends from here
http://developers.facebook.com/docs/reference/api/FriendList/
To fetch the albums of a friend you also need to set permissions
http://developers.facebook.com/docs/reference/api/permissions/
check:friends_photos
You can simply fetch the album like this
https://graph.facebook.com/{userId}/albums?accessToken=something
PS. you need to pull albums of friends one by one.
References to get you started
Start with the Graph API:
developers.facebook.com/docs/reference/api/
Read up on a few more things:
http://developers.facebook.com/docs/opengraph/
http://developers.facebook.com/docs/
Use Graph explorer to test things out:
http://developers.facebook.com/tools/explorer/
Your fist app
Now in order to do anything on facebook you need to create an application. You will get an app token when you do this. Something like: 288229791195831
Your users need to Like your application in order to use it. Then you can use it to post photos, wall messages etc.
This is the URL your application could use to log in a user:
https://graph.facebook.com/oauth/authorize?client_id=288229791195831&redirect_uri=http://www.facebook.com/connect/login_success.html&type=user_agent&display=popup&scope=publish_stream,user_photos,read_stream,email
Replace your client_id with the app id you get from facebook. Scope shows the permissions this app is requesting.
Good luck!
I recently made my first facebook app which works as a "connection" for posting messages to different walls. I got it all working and I now want to test it with other users. If I want a second user to be able to post to the walls through my app what needs to be added? The users can perfectly login through my php script but they are being refused when they try to post to the walls.
Should the users be added in the "Roles" section of my app? If yes, then they have to be "verified developers"?
Thanks in advance.
Check this out this might help you - http://thinkdiff.net/facebook-connect/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/
Or if you can post your code, then i can surely help you to make it available to any user to use your app to post on their walls
If the user wants to post anything to their walls using your application, then they need to grant publish_stream extended permission to your application and using their access_token, you can allow them to post anything to their walls from your application and not just one user, any number of users will be able to do it, so if you post your code, i can help you with it.