Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

facebook.request invitable_friends not calling back on Android.
Started by TawaNicolas Jul 27 2016 01:14 AM

8 replies to this topic
facebook android
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 11 posts
  • Corona SDK

Hello!

 

I am trying to request: facebook.request("me/invitable_friends?limit=5000")

 

On iOS it's functioning properly, I get a callback and fill my UI with the list that I get.

 

On Android, I never get a callback. It just keeps loading. Which is weird because everything else I'm using from Facebook is working.

 

Is there anything that I might be missing for Android?

 

Thanks!



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

What happens if you use a lower limit, say 50?

 

Rob



[TOPIC: post.html]
#3

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 11 posts
  • Corona SDK

Same thing, just tested it to make sure. :(



[TOPIC: post.html]
#4

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 11 posts
  • Corona SDK

I also tried other requests like "me/friends", no callback.

 

Even though the login works fine on Android, and everything works perfectly on iOS.

 

Is there anything I might be missing?



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

Which Facebook plugin are you using?



[TOPIC: post.html]
#6

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 11 posts
  • Corona SDK

"plugin.facebook.v4"



[TOPIC: post.html]
#7

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 11 posts
  • Corona SDK

Is there anything I can do? This is really setting me back in my project. :/



[TOPIC: post.html]
#8

TawaNicolas

[GLOBAL: userInfoPane.html]
TawaNicolas
  • Observer

  • 11 posts
  • Corona SDK

I solved this by using this instead of Facebook's plugin.

local accessToken = settings.facebook.getCurrentAccessToken()

local json = require( "json" )

local function handleResponse( event )
if not event.isError then 
    local response = json.decode( event.response )
    -- Handle friends here under response.data 
    else 
    print( "Error" ) 
    end 
    return 
end 

network.request( "https://graph.facebook.com/me/invitable_friends?limit=5000&access_token="..accessToken.token, "GET", handleResponse )


[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

That's a good work around. I was going to try and see if I could reproduce your problem, but I'm having other Facebook issues on Android with my test app that we are trying to solve. I asked an engineer who isn't having the problem I'm having to take a look at the problem and see what's going on.

 

However, your REST solution is perfectly valid.

 

Rob




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: facebook, android