Facebook AppRequests No Error, but nothing happens...

Hello,

I am trying to make it so that people can challenge their friends with my app.  Right now I can see my friends and I can select those I want to send the request to, but once I click send nothing happens.

There is no error on the ADB Logcat, in fact it says fbconnect: success

How can I get this to work? 

I’m using the latest daily build 2013.1208

Here are my build settings:

 

iphone = { plist = { CFBundleIconFile = "Icon.png", CFBundleIconFiles = { "Icon.png" , "Icon@2x.png" , "Icon-72.png" , }, UIApplicationExitsOnSuspend = false, --UPDATE FB APP ID FacebookAppID = "###################", --I have my actual key here CFBundleURLTypes = { { CFBundleURLSchemes = { "fb###################", -and here } } } }, },

android = { usesPermissions = { -- This permission is required in order for analytics to be sent to Flurry's servers. "android.permission.INTERNET", -- These permissions are optional. -- If set, then Flurry will also record current location via GPS and/or WiFi. -- If not set, then Flurry can only record which country the app was used in. "android.permission.ACCESS\_FINE\_LOCATION", -- Fetches location via GPS. "android.permission.ACCESS\_COARSE\_LOCATION", -- Fetches location via WiFi or cellular service. }, }

--my global space local M = {} --Add Facebook Library local facebook = require( "facebook" ) local function listener( event ) print("I'm in the FB Listener Function") print("My Event type is: "..event.type) if ( "session" == event.type ) then if ( "login" == event.phase ) then --facebook.request( "me" ) --Challenge Message facebook.showDialog( "apprequests", { message="Download this game and try to beat me!" } ) end elseif ( "dialog" == event.type ) then local response = event.response print( response ) end end local FBLogin = function(appID) M.appId=appID facebook.login( M.appId, listener ) end -- assign a reference to the above local function M.FBLogin = FBLogin return M

--Here is how I'm calling the FB function --Require FB local facebook = require( "myFacebook" ) facebook.FBLogin("#################") --My Actual ID Here

The dialogs are a bit different in that, instead of returning a JSON response, they return an fbconnect URL.  After you send the request, you should see event.response with something like fbconnect://success?to[1]=1234&to[2]=56789, showing the Facebook IDs of the people the request was sent to.  You then have to parse that string to retrieve IDs.  Do you see that?  Or do you only see fbconnect://success, with nothing else?

  • Andrew

Andrew,

I do see the entire response fbconnect://success?to…etc.&request=…

But my friend does not get a notification at all.

Am I missing a step?

Interesting.  If your app is in Sandbox mode on Facebook, then maybe the request won’t go through.  You can check that on your Facebook Developer Portal app page.

  • Andrew

Thanks again!  But Sandbox Mode is off.  Any other ideas?  Anyone?

I guess it’s worth asking: are you sure that your friend doesn’t receive the notification?  Have you seen his device yourself?  There’s always the possibility (however unlikely) that he’s not looking for it in the right place…

  • Andrew

He’s looked in his wall, and in the appcenter/requests page and there are no requests to be found.  I’m running out of time with this project and I’m stuck :wacko:

I feel like I need a miracle… A Rob Miracle :slight_smile:

The dialogs are a bit different in that, instead of returning a JSON response, they return an fbconnect URL.  After you send the request, you should see event.response with something like fbconnect://success?to[1]=1234&to[2]=56789, showing the Facebook IDs of the people the request was sent to.  You then have to parse that string to retrieve IDs.  Do you see that?  Or do you only see fbconnect://success, with nothing else?

  • Andrew

Andrew,

I do see the entire response fbconnect://success?to…etc.&request=…

But my friend does not get a notification at all.

Am I missing a step?

Interesting.  If your app is in Sandbox mode on Facebook, then maybe the request won’t go through.  You can check that on your Facebook Developer Portal app page.

  • Andrew

Thanks again!  But Sandbox Mode is off.  Any other ideas?  Anyone?

I guess it’s worth asking: are you sure that your friend doesn’t receive the notification?  Have you seen his device yourself?  There’s always the possibility (however unlikely) that he’s not looking for it in the right place…

  • Andrew

He’s looked in his wall, and in the appcenter/requests page and there are no requests to be found.  I’m running out of time with this project and I’m stuck :wacko:

I feel like I need a miracle… A Rob Miracle :slight_smile:

I was if that some problem and the reason was that my app was in Sandbox mode (thanks @aukStudios). I added the person that I was trying to send the request to be an app tester in the Development Portal and the request worked fine.

Hi,

I had the same problem and I just found out the issue.

You need to make sure that:

  • your app is NOT in sandbox mode

  • you have setup the Canvas page (under “App on Facebook” on the Basic Settings for the App in developers.facebook.com)

Once I did those 2 things, requests could be seen.

Jorge

I was if that some problem and the reason was that my app was in Sandbox mode (thanks @aukStudios). I added the person that I was trying to send the request to be an app tester in the Development Portal and the request worked fine.

Hi,

I had the same problem and I just found out the issue.

You need to make sure that:

  • your app is NOT in sandbox mode

  • you have setup the Canvas page (under “App on Facebook” on the Basic Settings for the App in developers.facebook.com)

Once I did those 2 things, requests could be seen.

Jorge

Hi Jorge,

Apologies for the newbie question, but what does a canvas page on facebook have to do with a mobile app?  I thought the canvas page was for integrating apps into facebook, whereas we’re building them for android/iphone.  I can’t see how the canvas page fits in?

thanks

The canvas page is required because Facebook  needs to know where to redirect the user that clicked on your request.  We use a homepage about the app where the user can download it.

Hi Jorge,

Apologies for the newbie question, but what does a canvas page on facebook have to do with a mobile app?  I thought the canvas page was for integrating apps into facebook, whereas we’re building them for android/iphone.  I can’t see how the canvas page fits in?

thanks