开发者

Can a developer add "Places" to Facebook Checkin?

开发者 https://www.devze.com 2023-03-06 11:20 出处:网络
We have an iPhone app under development, and one of the requested features is to be able to add a \"Place\" using Facebook\'s API, and then share that Place with others using the app via Checkin.

We have an iPhone app under development, and one of the requested features is to be able to add a "Place" using Facebook's API, and then share that Place with others using the app via Checkin.

I remember reading about restrictions in the past - are they over wit开发者_如何学编程h now?

Can we freely take the user's current location, add it as a Place, name it, and share it with other users?


In order to create a Place on Facebook it must either be a Facebook Page or an Open Graph Object. You obviously can not create Facebook Pages via the Graph API, but you can however create Open Graph Objects.

Basically what you'd do here is allow your user to check in to a place, if this place is new then you create it in your own database on your servers, and you'd have an end-point that loaded the correct Open Graph data for that Place on your web servers. You'd then publish the check-in to Facebook for the user, and point it at the web end-point you created. This will cause Facebook to look up your graph data, create a graph object, and save the user's check-in. If the place they check in to already exists, then instead of passing a new web end-point, you'd pass either the existing end-point or the unique place id that Facebook assigned that place.

You can read more about each of the technologies you need to use on the Facebook developer documentation. Open Graph Protocol, Check-ins, and Graph API Object Selection.

0

精彩评论

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

关注公众号