Facebook Graph For Messages/Writing on Friend's Walls?

Discussion in 'iOS Programming' started by newtoiphonesdk, Jun 26, 2012.

  1. newtoiphonesdk macrumors 6502a

    Joined:
    Jul 30, 2010
    #1
    Here is my current setup. I can click a button and post an image and a comment or news story directly to my wall, mainly just doing some simple FBConnect or ShareKit options.

    I would like to expand this to something more complex and engrossing/useful. I would like to be able to take a comment or news story, and either send it in a message to someone on Facebook, or post it to any of my friend's walls.

    I believe I will need to use Facebook Open Graph to accomplish this, but am unsure of where to begin. I do have an App setup in Facebook, though it is essentially just for the purpose of SSO with my apps. Could someone direct me to a good tutorial to do what I would like and/or guide me through getting my app set up in Facebook, and then some suggestions for integrating with iPhone?
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    I believe that it's not possible to post something to someone else's FB wall from the FB graph API.
     
  3. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #3
    It is possible with the FB Graph API, you need the ID of your "friend", and post to there.
    If you are building up the FB Graph Dictionary, you need to post a ID with another parameter like "1818181818/me", so exchange that number by your friends, and that should work.
    How can u get those? You can get the ID of friends via a FB Call called Friends ;p
     
  4. newtoiphonesdk thread starter macrumors 6502a

    Joined:
    Jul 30, 2010
    #4
    I was able to get a dictionary returned with the name and associated ID of each friend using the graph endpoint me/friends, but now I'm stuck at presenting a dialog box with the message, and a list of "Suggested Friends" and search bar that you can search through those friends, and then send it to up to I think 10 at a time?
     
  5. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #5
    So what's the issue? you don't know how to show a dialog box (I create my own, don't use FB's ones). And then send it to that friend? you should go baby steps, try to post on a friends FB first, then start adding the "list" & then the search, and so on.
     
  6. newtoiphonesdk thread starter macrumors 6502a

    Joined:
    Jul 30, 2010
    #6
    I'm having a couple of issues right now. The first is taking the NSData and converting it to an array or mutablearray that could populate the list of the table view. After that is the issue that with users with many friends, getting the data sometimes takes a while, so I'm worried about it becoming a memory issue. I believe I'd be fine making my own dialog box to do all this in, but was just wondering...does Facebook have anything of their own, or does each app that allows you to type in friend's names, or choose from suggested friends (Like the Are You Smarter Than a 5th Grader App) build their own dialog?
     

Share This Page