Facebook graph api post a sell post on facebook group's wall - facebook

After reading Graph API documentation, stackoverflow questions, etc, i'm still confused on the task i have.
In short what i want:
-i have a classified ads website and i want to publish the ad from it to a facebook group where i'm not an administrator.
I have a facebook page (which is represent my website) from the name of which i want to publish an ad in the group. The ad in the group must be published as the "sale" post.
I'm using Facebook javascript SDK for this.
So, i'm really stuck in how do i do it.
what i tried is publishing using my app, using user/page access_token, but always getting different problems.
Can someone tell me, if it is possible to make what i want? and if possible - the algorhytm, what should i do for that?

Related

Sync post between Facebook Group and Website using Graph API

I have a website and a very active Facebook group.
I need a Two way sync between the Website and the Facebook Group.This means anything posted on the website should be automatically posted on my Facebook group and anything posted on my Facebook Group should be posted on my website.
At the moment i have figured out the way to post from my website using the graph api.
My question is how do i do the vice versa i.e whenever a post gets posted on my website i automatically update it on my website.
Is there a api to do this ,some kind of push from facebook or is continuous polling only way ?

Posting something that happened to Facebook through an HTML Button

I've looked through several tutorials on using the Facebook API, but none of them address what I'm trying to do.
I'm working on a website for a small college. When the user applies online, they would like it to redirect to a page with a link that will put a post on your Facebook wall that says, "Billy just applied to Awesome State College" with a link to apply and an image of some sort (probably the school's logo).
I guess it would be similar to the way Facebook games throw up posts, saying "Gertrude just clubbed 300 baby seals in 'Clubbing Baby Animals Pro'!" But I wouldn't need to create a whole new Facebook app for this, would I?
Posting on a user's wall requires an access token, which you can get with the help of
one of Facebook SDKs, which will need your app id.
Reference for posting on user's wall:
http://developers.facebook.com/docs/reference/api/
See section Publishing.
You can use Facebook Javascript SDk as the need is simple:
http://developers.facebook.com/docs/authentication/client-side/

Which app do I need to display facebook feed?

I need to display the "wall posts" from Facebook page to another website's social media wall.
The problem is that I never used neither Facebook nor any other social networks and got no clues on how do they work. That's why I'm pretty confused with API and it's terms.
The API docs say that I need a pageId for the page I'd like to display and appId and appSecret to get an access token to the feed.
I understand how to get the token and how to parse the results - but what kind of Application do I need for that? Should I create a facebook profile and make an application that would generate me these app codes? Or ask a page's owner to do it?
I spent quite a time googling but it must be something too obvious to write about it in docs? Help please?
The administrator of the facebook page is the only one that has access to the posts on the page wall.
For the APP:
The application can be created in any facebook verified account - go to: https://developers.facebook.com/apps and create the new app - this will give you the app id and secret.
Use the Facebook SDK that you feel most comfortable with to develop the app.
For the wall posts: There are several Graph API requests for wall posts in the form of:
https://graph.facebook.com/[pageid]/[call] where [call] can be posts, statuses, feed, home. See http://facebook.stackoverflow.com/questions/6214535/what-is-the-difference-between-feed-posts-and-statuses-in-facebook-graph-api for details about each.
Using an access token (that you said you already know how to get) the administrator of the page will be able to call the above URLs and get the wall posts.
For the part with posting the info on another social media website you have to specify the exact environment where you want the wall posts to end up.

Facebook App, Posting to Users' Wall Concept

I created a little Facebook app that posts to people's walls when they have a birthday coming up. This is all good, but there's a concept I'm not quite understanding.
I'm using a cron job to run a script that searches through users and posts to the ones that have birthdays on that day. I've created a Facebook account for the app so the post should be under the apps account. What I'm confused on is how is the script going to know to post from the app's Facebook account? Do I need to log in through the script somehow? If so, how do I go about doing that?
You are very close to the answer! Yes - you are correct, the application needs to use a certain access_token to performa actions "on-behalf" of the application.
You should read the Facebook Authentication Documentation under the header - "App Login" to learn how to obtain the app access token. After you have this token the methods you use to publish post are identical to regular posts.

How can i show the wall (feed) of my page to app on facebook?

How can i show the wall (feed) of my page to app on facebook? As i see in the page
www.facebook.com/kesha?sk=app_178091127385 and
www.facebook.com/pages/Khanduna-Yengu-Nangsu-Amuktang/187317137978077
I want show the wall(feed) of my page to my app of facebook. Please Help me.
I also try and see graph api as below
graph.facebook.com//feed
But Fail,
Please Help any one.
As I understand your question, you want to take the wall of your page and show the content of that on another page controlled by an app you have made, so that is the question I will answer.
There are a couple of things you need to do.
Facebook now requires you to have an access_token to get that information. You can get this in two different ways. Either you get your users permission to grab an access_token for them, or you create an access_token for one of the admin users with offline_access and manage_pages permissions.
There are problems with both cases:
1: Getting an access_token per user requires people to give permissions to your app which is quite annoying if they just gain access to the contents of the feed.
2: Having one access_token is also a problem seeing as Facebook puts a limit on how many requests you can make per access_token in a given time.
You need to balance these things out if you want the feed to be shown. Which case would you most likely use? If you don't have many users the second case might be the best, but if you go over the request limit no content will be shown and that could confuse your users.
Anyways.. Once you are past the access_token problem, you can access the information by getting the content from the page:
https://graph.facebook.com/YOUR_PAGE_ID/feed?access_token=YOUR_ACCESS_TOKEN.
You then get a nice json output you can use. If you are using the Javascript API you can simply use the information here:
http://developers.facebook.com/docs/reference/javascript/FB.api/
If you are ever unsure how to get the information you need there is a nice tool for that developed by Facebook called Graph API Explorer which you can find here:
http://developers.facebook.com/tools/explorer/