简体   繁体   English

如何使用Windows Phone 7.5在Facebook上创建位置?

[英]How can I create a place on Facebook with windows phone 7.5?

I am trying to implement simple checkin functionality in a Facebook centric, location based WP7 application I am currently developing. 我正在尝试在我目前正在开发的以Facebook为中心,基于位置的WP7应用程序中实现简单的签入功能。 I have managed to search and return a list of possible checkins within a given radius and checkin to one. 我设法搜索并返回给定半径内可能签到的列表,并将签到归一。 I am now trying to add a 'custom' checkin in case none of the available options are of interest to the user. 我现在尝试添加“自定义”签入,以防用户没有可用的选项。 Could you please advise as to how that can be done? 您能建议如何做到吗? I am assuming it will be something along the lines of 'create location and return newly created ID' but I do not know how one can create a location. 我假设它将类似于“创建位置并返回新创建的ID”,但是我不知道如何创建位置。

Thank you in advance. 先感谢您。

In order to create a Place on Facebook it must either be a Facebook Page or an Open Graph Object. 为了在Facebook上创建一个场所,它必须是Facebook页面或Open Graph对象。 You obviously can not create Facebook Pages via the Graph API, but you can however create Open Graph Objects. 您显然不能通过Graph API创建Facebook Pages,但是可以创建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. 基本上,您在这里要做的是允许用户签入某个地点,如果这个地点是新的,则可以在服务器上自己的数据库中创建它,并且您的端点将加载正确的Open Graph。 Web服务器上该地方的数据。 You'd then publish the check-in to Facebook for the user, and point it at the web end-point you created. 然后,您需要为用户将签到发布到Facebook,并将其指向您创建的Web端点。 This will cause Facebook to look up your graph data, create a graph object, and save the user's check-in. 这将导致Facebook查找您的图形数据,创建图形对象并保存用户的签入。 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. 如果他们签到的地方已经存在,则无需传递新的Web端点,而是传递现有端点或Facebook分配该地方的唯一地方ID。

You can read more about each of the technologies you need to use on the Facebook developer documentation. 您可以在Facebook开发人员文档中阅读有关需要使用的每种技术的更多信息。 Open Graph Protocol Check-ins , and Graph API Object Selection (http://developers.facebook.com/docs/reference/api/#reading) 打开Graph协议 签入和Graph API对象选择(http://developers.facebook.com/docs/reference/api/#reading)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM