开发者

how to show faces of people who are attending event created by my application using facebook api?

I am developing an application of create event in facebook . It has a regiatration page when a user creates event he can sell or buy ticket .the question is ho开发者_JAVA技巧w can i show facess of people who are attending the event created by my application?


If you've got the facebook ids ($uid) of the people who are attending to your event, you can show their face with a img tag with the href from this quick function:

public function getPicture($uid, $size) {
    return "https://graph.facebook.com/".$uid."/picture?type=".$size;
}

There is several sizes :

  • square (50x50)
  • small (50 pixels wide, variable height)
  • normal (100 pixels wide, variable height)
  • large (about 200 pixels wide, variable height)

see http://developers.facebook.com/docs/reference/api/


To get the users who are attending, you need to call the "attending" connection of the event object:

https://graph.facebook.com/EVENT_ID/attending?access_token=XXXXXXXXX

Then you could use the approach mentioned by @jmeyo.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜