Posting to a business page from outside facebook? - facebook

As the title says, I'm trying to create a web page that allows admins to post to a facebook page, not a profile. How do I go about doing this? I can easily post to my profile wall, but I can't seem to find anything on posting to the business page wall.

It's the exact same process to post to a Facebook Page's Wall, but you need to use the Page's ID and not the user's:
POST to:
https://graph.facebook.com/{page_id}/feed
POST BODY:
access_token={access_token}&message=Hello
Make sure you have the "publish_stream" permission from the user.

Related

Facebook: Comment to User's post using my facebook app's page

I'm developing a Facebook app where the app post a picture to user's wall after the user grant required permissions.
However according to Facebook's privacy policy they don't allow our facebook apps to post anything to user's wall which haven't explicitly entered by the user(neither as the text of the post nor as a comment to that same post).
But I need to let the people who see the post on user's wall to know where the user got it from(a link preferably).
So is there a way to post a comment to the generated post in the user's wall as my facebook app's page??(So that the comment is not posted by the user and does not violate facebook's policy)
Grateful for any help.

Post to facebook wall as a visitor trough API

I have a facebook page for a project I am doing. I embedded the timeline stream in my external website, but now I want visitors of my website to be able to post to my wall. They need to be able to post as themselves, not the administrator of the page.
How should I do this ?
#EDIT: I searched the facebook developers page allready ofcourse, but didn't find the info I need.
In this case
Facebook PHP API post to wall falls under "Recent Posts by Others"
they posting to a FB Wall maybe u have to check if the access token u get from the users allow a post to a page wall.

Link or connect facebook comments plugin to comments on fan page wall posts

Facebook comments plugin - as far as I understand, if I have put the facebook comments plugin on a post web page, and the permalink of the post being commented on matches the base URL, then comments are stored via facebook using my post permalink.
Lets say if I post the permalink onto my facebook page wall (which I am the admin of), the open graph tags come into play, all the relavant data is pulled in, fb:admins, fb:app etc.
But is it possible to connect my facebook page (using my facebook page ID) to that permalink - so that comments posted on the page using comment plugin, connect/link with the post comments on my facebook page wall?
Thanks
This is currently not possible. We've implemented custom solution using Facebook Application and Facebook Javascript SDK on the website itself. You need to query the comments table of a specific Page post via FQL using your app access token from your server to retrieve all comments and render them on the page.
Then you need to provide user with several entry points for several states in order to enable posting for them. You need to solve four cases:
User doesn't like the page and didn't authorize your app
User doesn't like the page and authorized your app
User likes the page and didn't authorize your app
User likes the page and authorized your app
User needs to like your page and authorize your app with publish_stream permission in order to be able to comment on your page posts via your website. Of course you need to maintain reference between posts on your page and posts on your website.
The website where we did this a few years ago is BIGGBOSS click on "Komentáře" and find the same post on Facebook with the same comments.
As far as I understand your question its not possible to connect the comments from the commentbox, integrated in your non-facebook page (e.g a blog of yours), to the comments which are posted to a post on your fanpage.
The only solution would be to build an custom commentbox with the open-graph and publish the comments to the fanpagepost and additionally extract the comments out of the fanpage to display them on your blog.
But this requires accepting permission dialog before people are able to comment on your blog which would probably decrease the comments made. You would lose the benefit of the built-in commentbox.

Post on a company facebook page wall on behalf of a user

I have a wp7 app that connect with facebook and lets assume i have the users access token
I am wondering if it is possible to write on the wall of some company facebook page as the user. (i have no ownership of the facebook page and not affiliated with it in any way)
If it is, do you know which permission do i need to obtain ? would love to get any kind of code snippet or a direction i should follow.
Thanks.
it's not possible to write on the wall on behave of the user. You always get a token in the context of a Facebook application - so it will be the app posting on the wall, not the user. And the maximum permission app can ask a user for is publish_stream which allows you (your app actually) to:
Enables your app to post content, comments, and likes to a user's
stream and to the streams of the user's friends.
so in order to post to the company wall, you need to:
Request publish_stream permission from the user
Issue a post request to https://graph.facebook.com/<>/feed url with your message
It's really easy to test. Go to https://developers.facebook.com/tools/explorer, click on "Get access token", select "publish_stream" permission in "Extended" tab, set action to POST, enter "LGUSA/feed" into URL field, click on "Add a field", enter "message: test" and click POST. You will get ID of your post back. See screenshot attached
Sorry this is going to be a bit vauge, but here goes:
First the user is going to have to be authenticated to facebook. There is a good example here. This will give you an authentication tolken to allow you to interact with the API.
The user is going to need facebook permissions to write to the wall. Facebook permissions are described here. I don't know about the specifics of your problem, but with more details I may be able to help more.
then you shoud be able to post to the appropiate wall using the facebook graph api (you'll probably need to be signed up to facebook with a developer account to get to this page).

Should you necessarily be page admin to post on a Facebook Page

I would like to post data to a Facebook Page using Graph API even if I do not have Admin rights on the page.
I am familiar with pages with stricter permissions.
For example, http://www.facebook.com/barackobama is a page where I cannot post data even if I 'Like' it.
My questions are,
Can one create such a page with permissions so that any one can post data on it?
What is the minimum criteria to post data on a Page? ( Should I be the Page Admin / I Like Page / Anyone with a Facebook login)
If I cannot post to a page without admin permission, can I use public groups to post data via Graph API?
Any feedback will be greatly appreciated?
Disclaimer: I asked this on Facebook Developer forum also. Seems like the average response time is too slow.
Page admins can specify if Users can or cannot post on its wall, even if they are fans already.
The criteria is:
You like the page
The admin settings for "users can post on page wall" is checked
No you cannot use groups to publish to a page.
The questions might be irrelevant if you really wanted to post to a page. Your questions mean that you will post on the page as yourself. There is another way to do this, but you will be posting as the page itself.
Get an admin of the specific page to allow your app with these permissions "offline_access,publish_stream,manage_pages". Get his access token, query "me/accounts" in graph API, get access_token of the page, publish to wall using the page's access_token.