I have an ASP.NET application and a Windows Service. My ASP.NET application allows for users to allow the application to connect with Facebook. If a user has connected the application with Facebook, the Windows Service will later (sometimes much later) post a message on the user's News Feed. I have two questions:
- What information do I need to collect from Facebook?
- How do I collect that information?
I know that I will need to save some information back to a database that both the ASP.NET application and th开发者_如何学Ce Windows Service can access. I have this approach working with Twitter. But I am trying to figure out how to do it with Facebook without much luck.
Thank you for your help.
You're basically limited to the list of "ids" in terms of data you can "save back to a database". For example, on a connect site, you cannot store their "name" or "about" for more than 24 hours:
http://wiki.developers.facebook.com/index.php/Storable_Data
To actually get the data you'll want to use one of the following API methods:
http://wiki.developers.facebook.com/index.php/Users.getInfo
http://wiki.developers.facebook.com/index.php/Users.getStandardInfo
More than likely, getInfo
as getStandardInfo
returns you cannot display publicly. You'll of course need to use Facebook Connect to first authenticate the user, then you can query the API using Javascript or an ASP.NET FB library to get API results. You'll find a load of client libraries here:
http://wiki.developers.facebook.com/index.php/Client_Libraries
http://wiki.developers.facebook.com/index.php/ASP.NET
精彩评论