facebook auto post - facebook

I want to develop a facebook application that make auto post to a facebook page
like this one http://apps.facebook.com/twitter/ but my application get post from other site
when user make a post in my site it will send to the facebook page even this user not loged in facebook or not page admin .
tnx for help

Yes, you can do this. You'll need to do an initial login to facebook through a webservice and request elevated rights (publish_stream and offline_access), and then save the authentication token that comes back. You can then reuse this token and post to a facebook wall without anyone having to explicitly login to facebook.
I did this using Hammock to create the webservice calls to facebook.

Related

C# Facebook sdk: posting on page on owner's behalf

I have a page on facebook and i want to get my page access token so that i could use it to post ob my page from a mobile application or web application using the facebook sdk for C#.
I think the whole idea would be:
user will go to my webpage.
user will then login to facebook.
user will be taken back to my page with the his page's access token.
i will save this access token and then use it to post on his page on his behalf.
Right now i am not sure whether these are the right steps or not and if i am right, how can i make a facebook login page where user can use?
EDIT:
I found some answer here: Programatically log in to facebook and post from server side
do i need to create a facebook app for that?

fb app post on users wall

How to make a fb application that operates like this:
When a user visites a page of MY website ex. http://www.mywebsite.com/page1.php it will request the user to confirm the Facebook Application to make able the content of page, and then the application will post on users wall the page that the user visited on my page !?
Any idea, any script, any everything, I dont know how to even start it.
First, when the user enters your website ask him to login with facebook (ref: login).
After the successful authorization, simply use the Feed Dialog and post the link to current page on his wall.

Twitter API OAuth session expires, Facebook's doesn't

I use the Twitter Anywhere API and OAuth to authenticate users on my website. The cookie with the accessToken expires after two hours, which is why the user needs to login and connect to Twitter regularly. The workaround would probably be to store the auth_token in a cookie and provide it the next time the user loads the page after the cookie set by twitter expired.
Now something that is not clear to me: I'm also providing Facebook as an authentification method and somehow it doesn't forget the login. The Facebook JS API doesn't store any cookies on my page, so how does it know that the user is authenticated with Facebook and my application?
are you talking about this? see the channel file portion.
EDIT: Above link has been changed. And, facebook api has changed too.
The Facebook JS API doesn't store any cookies on my page, so how does it know that the user is authenticated with Facebook and my application?
It makes a cross-domain request to facebook.com, to see if there are cookies under that domain that indicate there is a user currently logged into Facebook in some other browser window/tab.
Once it has figured out that a) there is a logged in user and b) this user has used your app before – it logs him in to your app on the fly and gives you a fresh (short-lived) user access token to work with.

How to get the logged in user's facebook ID?

I am using facebook connect to allow users to log-in to my site using facebook. I am using the server side authentication using OAuth in classic ASP, vbscript. I want to know if one of the following is possible:
1) Can I identify if the user has authorized my app without redirecting to the Auth dialog? ie, even before the user clicks the facebook login button to log-in to my site, is there a way I can find out if the user who is currently logged into facebook has authorized my app?
2) How can I get the facebook user Id of the user who is currently logged into facebook? This is outside the facebook authentication process. Does facebook offer some api which I can use to read the fb cookie that is set when a user logs into facebook and get the logged-in users's facebook user id?
Thanks
1) Use FB.getLoginStatus from the JavaScript SDK.
2) If he’s not connected to your app yet, then not at all. Otherwise, see 1)

Facebook request change according to different login

Will the facebook fetching a tab application differs according to different login?
If I am login as application admin or page admin then facebook fetches the application through POST and if i am login as a normal user, then facebook fetches the page through GET
As I know, Facebook integrate with your app (iframe) with only one method (i.e POST). Everything you put on app URL facebook will post to your iframe.
For example apps.facebook.com/your_app/id/1, Facebook will POST id=1 to your iframe.
However, you can check an user whether is an app/page admin or not by using Open Graph API:
http://developers.facebook.com/docs/reference/api/page/#admins
I think you question somehow relate to this:facebook application API check if user is application admin in facebook
Hope this will helps.