开发者

How to update facebook profile info from code?

Does someone know the API for updating user profile information on facebook? I want for inst开发者_如何学Pythonance to change my location from my client application. Is that possible?

I am using Facebook C# SDK, but an example in any other language would be great.


I do not believe they support updating a user's profile information from the exposed Facebook API. The Graph API documentation currently states that only the following elements are editable (editable as in, you can create them):

  • Wall Posts (feed)
  • Object Comments
  • Likes
  • Notes
  • links
  • events
  • event status
  • albums
  • album photos
  • checkins

As you can see, the User object is not one of objects Facebook exposes for edit purposes. It does support the ability to publish location checkins, however. While this does not meet your goal of modifying the location attribute of a user's profile, it does provide some basic abilities.

POST https://graph.facebook.com/<profile_id>/checkins?
          access_token=<access_token>
          &coordinates={...}
          &message=my+message
          &place=<page_id>
          &tags=<tag1>,<tag2>,...

See the checkin documentation for an example using curl. This example should be executable by any platform specific Facebook API (Java, C#, etc..).


You can't update informations from the API. All you can do is reading / searching / posting / deleting / analysing data. You can find everything there.

Cheers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜