Take the 2-minute tour ×

I need help about the connecting to facebook via api or like that. I have community users, and they trusting to my application (just a idea) and they gave me their facebook, friendfeeds, twitter username and passwords.

Then i need to send status update to these social networks via their apis. I found twitter and some social networks connection via api programmatically and they working on my project, but facebook isn't.

Facebook api talking about the facebook connect and it need to httpcookies for authenticating and authorizating the users. But my application's messaging layer working on the middle layer of the my application. So, i have tried to find some solution for connecting to facebook programmatically for per user requests, i didn't anything.

Can someone tell me please, how can do that ? Also, is there any api or any example code available over the internet for connect to facebook with username and password without API key or SecretKey and so on..

Thank you

share|improve this question

2 Answers 2

First of all: collecting people's usernames and passwords is insane. Don't do that. You should be a trusted source and in this day and age of openID and OAuth platform authentication, it's just not necessary or acceptable. Twitter has an authentication method similar to Facebook Connect now as well: http://apiwiki.twitter.com/OAuth-FAQ

That being said...to answer your question, Facebook doesn't have a "direct" API that you can just query. Facebook Connect is a different beast than that of say Flickr, Twitter, or YouTube APIs. You would have to create an application on Facebook and use Facebook Connect to authenticate the user (they login ON Facebook, not giving you any information) first. You cannot access their email or password, but you can contact them through the Facebook API once authenticated. The API is quite limited in what you can access and also has limits on what data specifically you can cache.

Once the user has authenticated your application, you can use the javascript or php libraries to set their status and post wall posts: http://wiki.developers.facebook.com/index.php/Users.setStatus. Please note that to update status you first have to prompt your user to give you the status_update extended permission.

Edit: No, you can't access user's data without an api key or secret or without them authenticating you. Again, asking people for their account information is very shady (IMO).

share|improve this answer
Typeoneerror thank you for your open and clear description, actually i agree with you about the collecting their username and password. Sorry about that i wrote mistake description. I need to explain that users use their own program on their privacy, in my question i tried to explain how to retrieve and store their api key and secret, otherwise everytime it will try login to facebook for status change. On the other hand, i'm trying to create social network status updater program, it will update a lot of social network status from one point. Thants my question's source. –  fyasar Nov 5 '09 at 19:06


check the article here

That said you might be ok with Facebook Connect

share|improve this answer
Yes, you are right but current facebook plugin support that login with api and secret key. ButIn this rules, only login the develeper or users should create api key and secret keyform the facebook, after that they uses that. Thanks for your response anyway. –  fyasar Nov 5 '09 at 16:34

Your Answer


