post on facebook page wall as facebook admin through facebook php api - php

I would like to post feed to facebook page wall as page admin. I can publish post to facebook wall with publish_stream from fb php api, but it is just as a normal facebook user. May I know how can I do likewise as a page admin (meaning that the post publish from facebook page and not from other fb user on the page wall)? Thank you. It is urgent.
Regards,
Benjamin

Just come across this question. This was a know bug within the Graph API which has now been addressed. There is an additional permission named manage_pages which has been added to the list of extended permissions. If you request this permission as part of your authentication process then you should be up and running.
Further information can be found in the documentation and the bug fix that has been put in place.

it is mentioned here.
If you want to post to Page Wall as Page, use page id in the UID not in the target_id.
Pages can't post to other pages.
If you want to post to Page Wall as Application, use page id in the target_id, and the app id in the UID here

Related

Use facebook sharer.php to share on a page wall

I want to link a user to make a share post on my fb company page without having to authenticate. Currently I can get them to share on their own wall with:
But I'm not sure how I can get this to share to a page's wall rather than their timeline.
I got somewhat close by using the dialog feature:
https://www.facebook.com/dialog/feed?app_id=xxx&link=xxx&picture=xxx&name=xxx&caption=xxx&description=xxx&redirect_uri=xxx
But that just showed it as a normal share but done "via appName", unless there is a step I'm missing to link my app to my facebook page?
Thank you!
Unfortunately, the sharer.php method is used only to share only on the user's timeline.
If you want to ask the user to post on a page's timeline, you have to create an app, ask the user to authenticate it and then use the Facebook APIs to post on their behalf. I guess that will be cumbersome in your case, so I would just suggest you redirect to the particular Facebook page.
You can't !
To publish on YOUR page timeline, users need to have the rights to do it (be admin, writer, ...) : it's a manual requirement on the Facebook interface.

Is it possible to display Facebook users timeline on website?

OBJECTIVE: I need to display latest 5 entries from users timeline on website, using PHP.
Please not that i speak about timeline of user profile - not fan page, not group.
SO FAR I DID THIS:
Registered as Facebook developer
Registered app
Obtained token
Opened url: https://graph.facebook.com/USER_ID/feed?access_token=MY_TOKEN
Voila. Feed of that user is displayed now, but..
PROBLEM: So now i have users feed, but it looks like its partially working.
It happens often that it don't displays some updates, sometimes it displays just date of the post and not the content.
However when i try to grab feed from some facebook fan page, then everything work normal.
MY QUESTION: Are we allowed to grab user timeline? If yes, what im doing wrong?
You won't ever see all the information that is visible inside the Facebook app via the api. This comes from how Facebook filters out the data. See this Facebook Developers blog post for more information: https://developers.facebook.com/blog/post/478/
Yes you are allowed to to grab user timeline posts, even with a limit, if your app asks for read_stream permission. Issue an HTTP GET request to the below URL:
https://graph.facebook.com/user_id/posts?access_token=token&limit=5

How to make the facebook comments on my website and on page's wall post binded?

everybody.
I am developing the facebook tab application. The functionality is pretty simple and is close to the blog.
Page Admin writes articles in the app, and the link to each article is posted on the page's wall via Graph API.
The wall post from step 1 contains a link to the application tab of the page with post_id passed via app_data parameter.
The article itself contains the facebook like and comments plugins on it. To attach this plugins I use the url of the external website on which pages are prepared for Facebook scraping (Open Graph tags and stuff).
And finally the question!
Is it possible to somehow manage the situation whenever user posts the comment inside an application tab, his comment automatically appears near the wall post performed in step 1?
I really hope that the question is clear. Any help, please?
You can publish comments to a Post via the Graph API:
https://developers.facebook.com/docs/reference/api/post/#comments
You will need to ensure that you have:
Requested publish_stream permission from the user
Indicate to the user very clearly that you are going to publish a comment when they do this (to do otherwise would not only break Platform Policy, but would be a crappy experience for users)
Subscribe to the Javascript comment.create event which is fired when someone posts a comment in a comments plugin: https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/

Application able to post on user's Wall

I have a Fan Page and I need to post something on users Wall after clicking Like Button. Moreover I need to display different content for users who "Like" the page and for users who don't "Like" the page. Is there an application like "Static iFrame Tab" which already solves this? If not, then how to post something on users Wall? I downloaded the facebook.php file, but I haven't managed to find the required function there.
The user's 'like' status can relatively easily be returned by decoding the signed request sent by Facebook to the page.
I've built a simple fan/like gate that is available over on GitHub - it might help you get up and running.
With regards to posting to the user's wall. I would suggest using the Javascript SDK and reading the FB.ui documentation over on Facebook.

Facebook post to wall

I have a Facebook Application Profile Page that I would like to create a custom script to perform wall posts on its wall. The reason I need this is because the existing Facebook "Post to Wall" functionality does not post the pictures I want it to.
What I need is a PHP webpage that allows me to do this:
Inputs:
App ID (App ID of the Facebook App that I am looking to post to wall)
API Key
App Secret
URL of Image to post
Message Body
URL of link
Output:
the post is made to the wall of the Facebook App Profile page, so that anyone who has "liked" the page can see it.
Any ideas, brainiacs?
That's all supported by the graph api, you'd need to submit to http://graph.facebook.com/app/feed with the post submitted as POST data (message), and of course an access token. If you use Facebook's own php library, there are functions which will implement the api calls using the curl library for you.
If you haven't used the graph api before, you should start reading their developer resources at http://developers.facebook.com/docs/reference/api

Categories