How does an app use Facebook Graph API?

Discussion in 'iOS Programming' started by patent10021, Jan 23, 2016.

  1. patent10021 macrumors 68020

    patent10021

    Joined:
    Apr 23, 2004
    #1
    So Graph is the relationship between users and info i.e. posts. And the SDK includes login and all that.

    Are they completely separate? You obviously cannot use use Graph without the SDK right?

    How would a social app for example use the Graph API? If I'm in Facebook and I like a post and share it to my social app is that using the Graph API?
     
  2. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #2
    You should download the Facebook SDK for ios and do some reading, tutorials, etc. It's essentially an API that allows you to make HTTP requests to do things like liking a page, posting on a wall, etc.

    You can use the Graph API purely through HTTP requests but it's better to stick with the Facebook SDK.
     
  3. patent10021 thread starter macrumors 68020

    patent10021

    Joined:
    Apr 23, 2004
    #3
    Found some great YT videos too. But site and documentation seems like they're separate. Why wouldn't the API be included in the SDK?
     
  4. AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #4
    The SDK uses the Graph API. Just learn the SDK and don't worry about the Graph aspect for right now.

    Is there a specific goal you are trying to accomplish?
     
  5. patent10021 thread starter macrumors 68020

    patent10021

    Joined:
    Apr 23, 2004
    #5
    AN, that's what I figured!! Thanks!! Graph is just the way in which Facebook connects users with shared posts and data etc. So as long as I install and learn the SDK all should be good!!

    Yes, as you probably already know I am working on that Apple Watch app based off of the already existing colossal global chat app. I'll be connecting to their repo next week.

    They asked if I was familiar with the Graph Api and I didn't reply yet because I wanted to make sure I could legitimately say yes or no. I have developed using the FB SDK but only using logins and the usual superficial aspects of the SDK. But at least I've already set it up so all is good. They aren't currently using the SDK because the project started where the Great Firewall is :p But now that I'm on board they are asking me about it :rolleyes: So I know they are not familiar with it but want to use it :cool:
    --- Post Merged, Jan 23, 2016 ---
    Btw, the SDK will obviously be written in the host iOS app right so what would my responsibility with the SDK be if I'm only writing the watch app? I'm trying to think of code related to the Connectivity Framework that I might have to write.

    The host app has already downloaded and deserialized the data. So if the user has logged into FB via iOS would I even need to do anything in the watch extension?
     

Share This Page