I am looking for a way to connect to Facebook by allowing the user to enter in their username and password and have our app connect to their account and get their contacts so that they can invite them to join their group on our site. I have written a Facebook app before, but this is not an app as much as it is a connector so that they can invite all their friends or just some to the site we are working on.
I have seen several other sites do this and also connect to Yahoo, Gmail and Hotmail contacts. I don't think they are using Facebook Connect to do this since it is so new, but they may be.
Any solution in any language is fine as I can port whatever example to use C#. I cannot find anything specifically on Google or Facebook to address this specific problem. Any help is appreciated.
I saw a first answer get removed that had suggested I might need to scrape the friends page. The more I look around, this might be what I need to do. Any other way I think will require the person to add it as an app. I am wondering how a answer can get removed, maybe that user deleted it.
Not answering the question but hopefully providing some insight...
It's features like this that teach people that it is ok to enter their username and password for site A on a form from site B. This is most definitely not ok. Please do not make people think it is.
But maybe the Facebook API allows you to circumvent this problem, by making people log into Facebook itself to give your app access. A slight but important difference.
You can use Facebook Connect 'Account Linking'.
Python/Django example from Facebook developers wiki:
Page:
def invite_friends(request):
#HTML escape function for invitation content.
from cgi import escape
facebook_uid = request.facebook.uid
# Convert the array of friends into a comma-delimeted string.
exclude_ids = ",".join([str(a) for a in request.facebook.friends.getAppUsers()])
# Prepare the invitation text that all invited users will receive.
content = """<fb:name uid="%s" firstnameonly="true" shownetwork="false"/> wants to invite you to play Online board games, <fb:req-choice url="%s" label="Put Online Gaming and Video Chat on your profile!"/>""" % (facebook_uid, request.facebook.get_add_url())
invitation_content = escape(content, True)
return render_to_response('facebook/invite_friends.fbml',
{'content': invitation_content, 'exclude_ids': exclude_ids })
Template:
<fb:request-form action="http://apps.facebook.com/livevideochat/?skipped=1"
method="POST" invite="true" type="Online Games"
content="{{ content }}">
<fb:multi-friend-selector max="20"
actiontext="Here are your friends who aren't using Online Games and Live Video Chat. Invite them to play Games Online today!"
showborder="true" rows="5" exclude_ids="{{ exclude_ids }}"> </fb:request-form>
I asked this question awhile ago and before facebook connect was live and well. The best way to really do this is using facebook connect.
http://developers.facebook.com/connect.php?tab=website
I am currently using this on our live site and using the Facebook Developer Toolkit for .NET on Codeplex here:
http://www.codeplex.com/FacebookToolkit
Good luck!
I looked up that it is alright to answer my own post, so here it is.
It turns out that you will have to scrape the friends list which is not legal in facebook terms of use. So we will not be doing this for our sites. Here are a few articles that show what happens when you don't play by the rules. Plaxo tested their scraping with Scoble and Facebook shut down Scobles account in January of this year.
http://scobleizer.com/2008/01/03/what-i-was-using-to-hit-facebook/
http://news.cnet.com/8301-13577_3-9839474-36.html
Seems like Facebook has an api for this. Check this blog here.
http://developers.facebook.com/news.php?blog=1&story=73
Here is an open source PHP 5 tool to let you import contacts from both e-mail and some social networks including Facebook: OpenInviter is an open source PHP class, written in PHP5, for importing contacts from most of the well-known e-mail providers & social networks.
Just import them into Yahoo using FB Connect. All better? No screen scraping, no FB violations. Done.
Related
We are helping a client who had a recent site redesign done on Squarespace.
With the iOS 14 update the client is worried about not being able to track Apple users for facebook ads.
One solution talked about is to implement the Facebook Conversions API where the Squarespace site would capture data for users that didn't block and we'd get it sent into the Facebook CAPI via a site like Zapier.
There is debate on Squarespace forums whether this is even worth it.
Our developers have not been able to find a clear way to get it done.
Anyone have experience doing this and if so, have then seen that it is worth it?
Thanks!
Jonathon
I am looking for a way to connect to facebook by allowing the user to enter in their username and password and have our app connect to their account and get their contacts so that they can invite them to join their group on our site. I have written a facebook app before, but this is not an app as much as it is a connector so that they can invite all their friends or just some to the site we are working on.
I have seen several other sites do this and also connect to Yahoo, Gmail and Hotmail contacts. I dont think they are using Facebook Connect to do this since it is so new, but they may be.
Any solution in any language is fine as I can port whatever example to use C#. I cannot find anything specifically on Google or Facebook to address this specific problem. Any help is appreciated.
I saw a first answer get removed that had suggested i might need to scrape the friends page. The more I look around, this might be what i need to do. Any other way i think will require the person to add it as an app. I am wondering how a answer can get removed, maybe that user deleted it.
Try This
Not sure if its possible explicitly but there are indirect ways to do it!!!
Here is another article that seems to cover what you want to do http://facebook-developer.net/2008/02/20/allow-your-users-to-invite-their-friends/
I am developing iPhone app where I need to provide integration with different social media like FaceBook, Twitter, Google etc. I have seen couple of iPhone applications that allow people to login using their existing FB or Twitter accounts and allow to post comments, like/unlike, follow people etc. I want to implement something similar but not sure where to start with. Could anyone please suggest me right direction? Any documentation and sample code would be great help.
Thanks.
http://developers.facebook.com/ has just about all the info you might need.
Further also look in Apples library as it contains sample code and extensive information about most topics.
#AppleDeveloper, check out Socialize; this is exactly the problem we're working to solve: http://www.GetSocialize.com. Full feature list at http://go.GetSocialize.com/features
The problem with just putting Facebook into your app is that your download base of users aren't all friends on Facebook. So any sharing in the app using Facebook will only go out to that user's friends.
Socialize lets all users of the app see the social actions other users of the app take, in addition to allowing those social actions to be shared on Facebook (and soon Twitter & Google+ as well). Then we give you a reporting dashboard so you can see the effect of all the social actions on downloads & user engagement: http://go.GetSocialize.com/dashboard
Let me know if this is the type of thing you're looking for.
DROdio
So with all these fancy new APIs and such that Facebook is making available, I've noticed that on the partner sites (Pandora, docs.com, etc.), there is no login---Facebook automatically signs you in. You don't even need to press a button to connect if you already have a FB session established.
Is this a feature of the new API? Or is this a Facebook partners-only feature? I haven't seen any information on whether this is possible for cool guys that don't run huge companies.
Thanks in advance
How about the Facebook blog?
http://blog.facebook.com/blog.php?post=383404517130
My app needs to invite friends from facebook conenct is this possibl e?
Any examples ?
Please help !
If you don't see it in the API, then it's probably not supported:
http://wiki.developers.facebook.com/index.php/API
You could load the page, http://www.facebook.com/invite.php in a UIWebView. The downside is the user would have to log in then.
You might want to contact the FB API folks and request it as a feature.
You can find info about using FBC on the iPhone here
there are two modes you can use it in. One where your developer secret is in the phone app, if that makes you nervous you can proxy the authentication through your own server. FB developer site has the info along with programmer supported wikis