I use Facebook graph api for posting status on wall with "me/feed".
I get a success response with ID but I don't see the post on my wall
and while I open facebook.com/ID I get "Sorry, this page isn't available".
What could be the reason for that?
You have to take the permission for "publish_actions" from access tokens. Documentation link for Permissions Later You may hav to use a Publish action. Documentation link for Publishing Actions
The user was connected with fan page user.
Related
I am using facebook API for posting in group and pages. I dont see an endpoint where I can post on my own newsfeed. What I see is only I can share content via fb link. Does someone know where could I find the endpoint on posting on own newsfeed? Thanks.
I stumbled into a facebook post where when user click the like button, or share the post or post a comment, a facebook page bot will automatically message the user. Here is the exact post:
https://www.facebook.com/ninjateam.org/posts/1799394500352455
I'm trying to look into the facebook developers API documentation on how to do those kind of functionality but always failed. Can you point me to the correct path where to start or what resource is used in those kind or post?
When requesting publish_actions permission the message says the app is willing to post on your friends' wall but I actually just want my app to let the user post videos on his own wall. Do I need this permission to do so?
If you just want to share a Link (to a Youtube Video, for example), you can just use the Share Dialog - no authorization or permissions needed: https://developers.facebook.com/docs/sharing/reference/share-dialog
If you want to upload a photo or video, you will need to authorize the user with publish_actions. Keep in mind that the message must be 100% user generated.
Check out the "Publishing" part of the Facebook docs: https://developers.facebook.com/docs/graph-api/reference/v2.1/user/videos
A user access token with publish_actions permission can be used to publish new photos.
...well, that is actually a bug in the docs, it should be "videos", not "photos", of course. I´ve filed a bug report for this: https://developers.facebook.com/bugs/303448543173296/
General information about sharing: https://developers.facebook.com/docs/web/share
Do you use standards dialogs? According to the facebook api documentation you don't need this permission for theses dialogs.
(see: https://developers.facebook.com/docs/facebook-login/permissions/v2.1#reference-publish_actions)
If you use the Facebook Graph API you don't need this permission if you only want to post on the user feed.
I can post on my friends wall after authenticating the Facebook Graph Explorer (or any app with publish_stream permission for that matter).
Facebook Graph Explorer
However, how can I validate in my app that the message has actually posted successfully to my friends wall? In some cases, I can go to my friends page and see my message appear, however, in other cases, I notice that there is no message on their wall.
In either case, Facebook returns an object id, like:
100002349949136_184284371659893
Yet, when I view these posts on the graph (link above), they both return false... The rules of my app require that a message is posted on another user's wall.
How can I validate that a message appears on a Facebook wall? Or how can I filter user's who have restricted 3rd party apps from posting on their walls?
The post must be publicly viewable if you're attempting to read the post without an app access token. If it is not publicly viewable, then you must have read_stream permission set in the app you're attempting to read the post with.
Here is the documentation. https://developers.facebook.com/docs/reference/api/post/
I'm working on a plugin for a Wordpress blog that posts a link to every article published to a Facebook Page associated with the blog.
I'm using the Graph API and I have authenticated myself, for the time being, via OAuth.
I can successfully post a message to the page using curl via a POST request to https://graph.facebook.com/mypageid/feed with e.g. message = "This is a test" and it published the message.
The problem is that the message is "from" my user account. I'm an admin on this test page, and when I go to Facebook and post an update from the web, the link comes "from" my page. That's how I'd like this to be set up, because it looks silly if all the shared links are coming from a user account.
Is there a way to authenticate myself as a page? Or is there an alternate way to POST to a page feed that doesn't end up being interpreted as a comment from a user?
Thanks for any thoughts or suggestions.
To post as the Page, you need to get an access token for the page by getting an access token for an admin of the Page with the "manage_pages" and "publish_stream" permissions. Then, using that access token, hit https://graph.facebook.com/me/accounts?access_token=THE_ACCESS_TOKEN. You'll get a JSON output of all the Pages that user admins and in there you'll see an access token for each Page. If you use one of those access tokens to POST your message, you will be doing so as the Page. The process is outlined in the documentation here (sorry, it's kind of buried).
Ah, it's a bug.
you need to use enable_profile_selector
http://developers.facebook.com/docs/reference/javascript/FB.login
Please have a look at the comments by "Nam Thai" on this thread: http://www.takwing.idv.hk/tech/fb_dev/faq/graphapi/graph_27.html. This solved the problem for me.