locked
Has anyone used the Facebook Graph API?

    Question

  • Hi,

            I have been working with the HTML5/Java script metro style application on windows 8 consumer preview. The application uses the facebook graph api. As I am new to this I have no idea about the callback url. We need to get the subscriptions on feed from the face book . In order to do this we need to define the callback url.


    Tuesday, June 19, 2012 6:14 AM

Answers

  • regel1, the answer is,

    1. you must have a website (does not need to make a website though),

    2. make a REST API to connect with Facebook graph, then that REST API you make will return the json string / xml / text to YOUR app, when your app request it from your website (REST), put the REST link as your callback to Facebook.

    Problem solved.

    • Proposed as answer by Raymond Goldman Tuesday, June 19, 2012 12:30 PM
    • Edited by Raymond Goldman Tuesday, June 19, 2012 12:32 PM
    • Marked as answer by Dino He Tuesday, June 26, 2012 8:57 AM
    Tuesday, June 19, 2012 12:30 PM

All replies

  • hmm...... that is actually a very good question, how can facebook call the callback URI you gave since it's not technically a website. I will try to help you with that.
    Tuesday, June 19, 2012 10:04 AM
  • I am using the graph api to get the notifications and the feeds from the facebook. The requirement is that the application should provide alert when someone posts on the users wall without polling the facebook server. For this facebook is providing a mechanism through subscriptions. But this requires the callback url.. Here I am struck. Can  I use some kind of service or some thing for this puporse??
    Tuesday, June 19, 2012 10:10 AM
  • Hi Reqel,

    How would you do this if you were using the API from a web page?  It would be the same teqnique.  Have you posted on the facebook forurms?

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, June 19, 2012 12:28 PM
    Moderator
  • regel1, the answer is,

    1. you must have a website (does not need to make a website though),

    2. make a REST API to connect with Facebook graph, then that REST API you make will return the json string / xml / text to YOUR app, when your app request it from your website (REST), put the REST link as your callback to Facebook.

    Problem solved.

    • Proposed as answer by Raymond Goldman Tuesday, June 19, 2012 12:30 PM
    • Edited by Raymond Goldman Tuesday, June 19, 2012 12:32 PM
    • Marked as answer by Dino He Tuesday, June 26, 2012 8:57 AM
    Tuesday, June 19, 2012 12:30 PM
  • you could use SOAP, but REST is a LOT easier.
    Tuesday, June 19, 2012 12:31 PM
  • Hi Jeff,

    I checked  with the facebook forums. In that it is the domain in of the web site in which the application is hosted. While this is not a web application so there is a callback url problem.

    Tuesday, June 19, 2012 12:33 PM
  • Hi Reqel,

    You will need to do the same thing and have the Metro style app communicate with your webservice then.  You cannot encapsulate the behavior of a website in a Metro style app.

    -Jeff


    Jeff Sanders (MSFT)

    Tuesday, June 19, 2012 12:35 PM
    Moderator
  • regel_1, read my reply, make a REST API, you have to have a website to talks with facebook, and your app talks with your website / web service. You can't talk with facebook directly because metro app is not a website.
    Tuesday, June 19, 2012 1:03 PM
  • If callback url is mandatory then how is the subscription to real time updates in case android applications, they also don't have a callback url right??
    Thursday, June 21, 2012 5:49 AM
  • Hi Regel,

    The experts in writing Facebook applications would be the people supporting these Facebook APIs.  Have you posted your questions there (Facebook development forums)?

    -Jeff


    Jeff Sanders (MSFT)

    Thursday, June 21, 2012 11:54 AM
    Moderator
  • Yes, I did post these questions to facebook developers forum but there is not response from them so far. Some even deleted my questions there. Hence I am posting here..
    Friday, June 22, 2012 5:25 AM
  • i believe you should read the documentation for the graph api more. The forum there is not very useful, based on my own experience. There are no one that answer questions.
    Friday, June 22, 2012 11:00 AM
  • Does windows 8 metro style application support push notification just wp7 if yes can some please tell me how I can do it with rest based WCF & subscribe to the channel created using winJS

    Wednesday, June 27, 2012 9:06 AM
  • HI,

    I want to post updates in facebook through metro style application. Is that possible in metro style application. And can you guide me in doing this, how to use those api's of facebook.

    Thanks

    Wednesday, September 19, 2012 10:29 AM