0

Can any one provide any sample to use the Facebook Checkin features in my WP7 app. Also on using the Facebook sdk v6.0.1, there is no Get() method, I can see only Getasync().. Can any one give suggestion on this.

Thanks in advance

Harlborn
  • 63
  • 6

3 Answers3

1

WP7 builds of Facebook C# SDK does not have synchronous methods. You will need to use the async alternatives using XAsync methods like GetAsync, PostAsync or DeleteAsync.

prabir
  • 7,674
  • 4
  • 31
  • 43
  • Hi prabir, thank you for your response. I am new to WP7 development. Can you provide any sample on using the Facebook sdk async methods. – Harlborn Apr 30 '12 at 06:43
  • Can you give me some suggestion or ideas to get the list of near places as per Users location in the map where User can make his Check in. Thanks in Adavance – Harlborn May 02 '12 at 16:28
1

With the Search option with the Graph API we can get the nearest places for Facebook checkin

For example: https://graph.facebook.com/search?type=place&center=13.08784,80.27847&distance=50000&access_token=DeviceToken

Harlborn
  • 63
  • 6
0

Getasync() is just a task-based version of Get(). You should be able to use it to make get requests to the platform, just as you would with Get. Example:

GetAsync("https://graph.facebook.com/me/checkins?method=post&place=110506962309835&coordinates={'latitude':'37.4163458217','longitude':'-122.15198690595'}&access_token=YOURACCESSTOKEN")

You can search for nearby Places via the Search API. See here for documentation developers.facebook.com/docs/reference/api/#searching. Example:

https://graph.facebook.com/search?q=coffee&type=place&center=37.76%2C-122.427&distance=1000&access_token=AAAAAAITEghMBAO1EYjStduqRsXrouwvoXm0ZBsj9LuD4miJiguLIgE5v7fwXSK8empPcUlacI6Gf34I5a9VTjLHyCb0eYOJODvsnMQQZDZD
Connor Treacy
  • 1,072
  • 6
  • 12
  • Thanks for the response Connor. As am a new to WP7 just trying to work it out. If you can, please provide any sample on this. – Harlborn Apr 30 '12 at 07:06
  • I've added a basic example. The method call is trivially easy, but the construction of the URL is important, and requires knowledge of the Graph API. You can do a post to the me/checkins API endpoint from a get request using the param "method=post", as in the example. – Connor Treacy Apr 30 '12 at 10:20
  • Thank you Connor. I will just try it out and post you the result. Thanks again – Harlborn Apr 30 '12 at 16:12
  • Connor, I could get this work as expected. I also wanted to get the nearby places in the WP7 map on which User can select his place to check in. As per my analysis in the FB Graph, I could not able to get the near by places. Can you help me on this ? – Harlborn May 02 '12 at 16:26
  • Glad to hear it worked for you. As for nearby places, there's no way to get a list based on where you are, at least none that I know of. You can get a list of your friends' checkins and use a map API (Google Maps or Bing Maps API for example) to plot places nearby that your friends have checked into. – Connor Treacy May 03 '12 at 09:34
  • Update: A colleague has pointed out that you can do this via the Search API. See here for documentation https://developers.facebook.com/docs/reference/api/#searching, and view an example here https://graph.facebook.com/search?q=coffee&type=place&center=37.76%2C-122.427&distance=1000&access_token=AAAAAAITEghMBAO1EYjStduqRsXrouwvoXm0ZBsj9LuD4miJiguLIgE5v7fwXSK8empPcUlacI6Gf34I5a9VTjLHyCb0eYOJODvsnMQQZDZD – Connor Treacy May 03 '12 at 09:43
  • Connor, Thank you. With the below search option in Graph API we can get it. https://graph.facebook.com/search?type=place&center=13.08784,80.27847&distance=50000&access_token=DeviceToken – Harlborn May 03 '12 at 11:27
  • I've added the additional question to your original question, and updated my answer to reflect the knowledge in these comments. – Connor Treacy May 03 '12 at 16:11