Welcome Developers!

in

Welcome!

in

Get friends info, not having yet added the IFRAME application

Last post 11-12-2010 11:33 AM by Joel. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-12-2010 2:43 AM

    • Daydou
    • Not Ranked
    • Joined on 03-23-2010
    • Posts 3

    Get friends info, not having yet added the IFRAME application

    Hello,

    I am migrating a Facebook application to Myspace.

    The app is an IFRAME app, and I am using myspace-php-sdk API to exchange data with Myspace. This works quite well for now, except for the following on which I am struggling:

    1. I want to have a page which displays a list of Myspace friends (images, names) who have not yet added the application
    2. Allow the user to select them
    3. Send the friends an invitation (requestShareApp, I guess, for which I have found the JS code)

    I am struggling at step 1: I get the friends IDs correctly, using the getFriends() call from myspace-php-sdk.

    But when I try to get their $hProfile->basicprofile->image or $hProfile->basicprofile->name, using getProfile() call from myspace-php-sdk, it is not available to my app. I believe this is because they have not yet added the app. I catch an exception with the following statusDescription:

    "User has not installed the current application or application does not have access to requested resource"

    Am I missing something ? Shouldn't a user be able to retrieve his friends, whether or not the app has access to their info ? Am I trying to implement this the wrong way ? Is it impossible to get images/names of friends who have not yet added the app ? How have you implemented this kind of invite feature ?

    Any clue or code appreciated.

     Best regards

  • 11-12-2010 9:41 AM In reply to

    Re: Get friends info, not having yet added the IFRAME application

     Hi,

     

    Yes, what you want to do is possible.  You can get the list of friends, along with their display names and pictures using the call to get friends.  You won't need to make individual calls for each friend's basic profile info.

    There's also a filter on HAS_APP, along with a HAS_APP field, that you can use to determine which friends haven't added the app.

     

    Yes, requestShareApp is the call you'll use to invite friends.

     

  • 11-12-2010 11:33 AM In reply to

    Re: Get friends info, not having yet added the IFRAME application

     Thanks, Codestorm.

     

    -Joel

Page 1 of 1 (3 items)