post screenshot to facebook

This is my build.settings file:

-- build.settings settings = { plugins = { ["facebook"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true }, }, }, android = { usesPermissions = { "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.INTERNET", "android.permission.READ\_PHONE\_STATE", }, }, orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown" } }, iphone = { plist= { UIApplicationExitsOnSuspend = false, FacebookAppID = "xxxxxxxxxxx", CFBundleURLTypes = { { CFBundleURLSchemes = { "fbxxxxxxxxxx", } } }, UIHiddenStatusBar="YES", CFBundleIconFile="Icon.png", CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-120.png", "Icon-60.png", "Icon-60@2x.png", "Icon-Small-50@2x.png", "Icon-Small-50.png", "Icon-Small.png", "Icon-Small@2x.png", }, }, }, }

Thanks

Can you please get the ‘adb logcat’ so we can have a proper go at trouble shooting

I just conducted a test last week when this thread came up.  I can post from system.DocumentsDirectory just fine.  In fact I just re-tested it with this code:

local facebook = require( "facebook" ) local fbAppID = "XXXXXXXXXXXXX" -- this is a fake AppID       local function onLoginSuccess()           local attachment = {         message = "A Moose!",         source = { baseDir=system.DocumentsDirectory, filename="moose.jpg", type="image" }     }     facebook.request( "me/photos", "POST", attachment ) end       local json = require( "json" )   local function fbListener( event )     if event.isError then         native.showAlert( "ERROR", event.response, { "OK" } )     else         if event.type == "session" and event.phase == "login" then             -- login was a success; call function             onLoginSuccess()         elseif event.type == "request" then             -- this block is executed upon successful facebook.request() call             native.showAlert( "Success", "The photo has been uploaded.", { "OK" } )         end     end end   facebook.login( fbAppID, fbListener, { "publish\_stream" } )

Since it’s Android, the build.settings doesn’t really matter as long as you have the INTERNET permission.

Looking at your copy code, are you sure you’re loading the file that’s getting copied?  In one place you copy myfile.png to myfile1.png but try to upload myfile.png.  Could this be the issue?

Rob

Hi,

the following is a global log as you suggested:

D/NetworkController( 265): intent is = Intent { act=android.net.wifi.RSSI\_CHANGED flg=0x10000010 (has extras) } D/NetworkController( 265): mWifiConnected = true D/dalvikvm( 6836): GC\_CONCURRENT freed 279K, 10% free 7933K/8775K, paused 2ms+3ms D/dalvikvm( 178): GC\_EXPLICIT freed 127K, 27% free 12597K/17159K, paused 2ms+5ms D/dalvikvm( 6836): GC\_EXPLICIT freed 293K, 11% free 7821K/8775K, paused 2ms+5ms D/dalvikvm( 178): GC\_EXPLICIT freed 118K, 27% free 12598K/17159K, paused 2ms+5ms D/dalvikvm( 6836): GC\_CONCURRENT freed 281K, 10% free 7934K/8775K, paused 1ms+4ms D/dalvikvm( 178): GC\_EXPLICIT freed 141K, 27% free 12597K/17159K, paused 3ms+5ms D/dalvikvm( 6836): GC\_EXPLICIT freed 290K, 11% free 7814K/8775K, paused 5ms+18ms I/ActivityStack( 178): START {act=com.amazon.kindle.otter.action.SHOW\_APPS flg=0x10000000 cmp=com.amazon.kindle.otter/.activities.AppsLibraryActivity} from pid 374 V/ActivityStack( 178): Prepare to front transition: task=TaskRecord{416a9350 #4 A com.amazon.kindle.otter.activities.AppsLibraryActivity} V/ActivityStack( 178): Prepare open transition: prev=ActivityRecord{4158d278 com.amazon.kindle.otter/.Launcher} D/dalvikvm( 178): GC\_CONCURRENT freed 978K, 25% free 12882K/17159K, paused 3ms+7ms V/PhoneStatusBar( 265): setLightsOn(true) D/dalvikvm( 178): GC\_EXPLICIT freed 494K, 27% free 12618K/17159K, paused 3ms+6ms D/dalvikvm( 6836): GC\_CONCURRENT freed 275K, 10% free 7935K/8775K, paused 2ms+4ms D/dalvikvm( 178): GC\_EXPLICIT freed 127K, 27% free 12614K/17159K, paused 2ms+5ms D/dalvikvm( 6836): GC\_EXPLICIT freed 287K, 11% free 7814K/8775K, paused 2ms+3ms I/ActivityStack( 178): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=it.developername.appname cmp=it.developername.appname/com.ansca.corona.CoronaActivity} from pid 465 V/ActivityStack( 178): Prepare open transition: starting ActivityRecord{41794330 it.developername.appname/com.ansca.corona.CoronaActivity} D/dalvikvm( 178): GC\_FOR\_ALLOC freed 868K, 27% free 12625K/17159K, paused 79ms V/ActivityStack( 178): Prepare open transition: prev=ActivityRecord{4153b1f0 com.amazon.kindle.otter/.activities.AppsLibraryActivity} D/dalvikvm( 178): GC\_CONCURRENT freed 193K, 21% free 13671K/17159K, paused 2ms+9ms I/ActivityManager( 178): Displayed it.developername.appname/com.ansca.corona.CoronaActivity: +296ms V/Corona ( 8087): \> Class.forName: network.LuaLoader V/Corona ( 8087): \< Class.forName: network.LuaLoader V/Corona ( 8087): Loading via reflection: network.LuaLoader I/Corona ( 8087): Platform: KFOT / ARM Neon / 4.0.3 / PowerVR SGX 540 / OpenGL ES 2.0 build 1.8@785978 / 2014.2329 W/InputManagerService( 178): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@413a6f88 (uid=32020 pid=374) I/Corona ( 8087): File does not exist: ueue.png I/ActivityStack( 178): START {act=SSO\_WITH\_FALLBACK cmp=it.developername.appname/com.facebook.LoginActivity (has extras)} from pid 8087 V/ActivityStack( 178): Prepare open transition: starting ActivityRecord{41564038 it.developername.appname/com.facebook.LoginActivity} V/ActivityStack( 178): Prepare open transition: prev=ActivityRecord{41794330 it.developername.appname/com.ansca.corona.CoronaActivity} E/ActivityThread( 8087): Failed to find provider info for com.facebook.katana.provider.PlatformProvider E/ActivityThread( 8087): Failed to find provider info for com.facebook.wakizashi.provider.PlatformProvider I/ActivityStack( 178): START {cmp=com.facebook.katana/.ProxyAuth (has extras)} from pid 8087 V/ActivityStack( 178): Prepare open transition: starting ActivityRecord{415f7b38 com.facebook.katana/.ProxyAuth} V/ActivityStack( 178): Prepare open transition: prev=ActivityRecord{41564038 it.developername.appname/com.facebook.LoginActivity} I/ActivityStack( 178): START {cmp=com.facebook.katana/.ProxyAuthDialog (has extras)} from pid 8045 V/ActivityStack( 178): Prepare open transition: starting ActivityRecord{41637bd0 com.facebook.katana/.ProxyAuthDialog} V/ActivityStack( 178): Prepare open transition: prev=ActivityRecord{415f7b38 com.facebook.katana/.ProxyAuth} D/WebCore ( 8045): \*-\* Start browser instrument D/OpenGLRenderer( 8087): Flushing caches (mode 1) D/WebCore ( 8045): \*-\* Start browser instrument D/dalvikvm( 8045): GC\_EXPLICIT freed 373K, 34% free 11998K/18119K, paused 4ms+8ms V/PhoneStatusBar( 265): setLightsOn(true) D/WebCore ( 8045): \*-\* Total load time: 370.76 ms, thread time: 26.00 ms for https://m.facebook.com/dialog/oauth?android\_key=XXXXXXXXXXXXXXXXX&auth\_type=rerequest&calling\_package\_key=it.developername.appname&client\_id=XXXXXXX&display=touch&e2e=%7B%22init%22%3A1402070113802%7D&legacy\_override=v2.0&redirect\_uri=fbconnect%3A%2F%2Fsuccess&response\_type=token&return\_scopes=true&scope=publish\_stream&type=user\_agent&\_rdr D/WebCore ( 8045): Only uptill WebViewCoreTimeCounter it is part of webcore thread time D/WebCore ( 8045): Rest of the timecounters are part of either UI thread or TextureGenrators(TG) thread D/WebCore ( 8045): Webkit TexGen thread time: 0.00 ms, Webkit UI thread time: 0.00 ms D/WebCore ( 8045): \*-\* Total css parsing time: 0.00 ms/percent webcore 0.00 D/WebCore ( 8045): \*-\* Total javascript time: 0.00 ms/percent webcore 0.00 D/WebCore ( 8045): \*-\* Total javascript init time: 10.00 ms/percent webcore 38.46 called 1 times D/WebCore ( 8045): \*-\* Total javascript parsing time: 1.00 ms/percent webcore 3.85 called 1 times D/WebCore ( 8045): \*-\* Total javascript execution time: 0.00 ms/percent webcore 0.00 called 1 times D/WebCore ( 8045): \*-\* Total calculate style time: 0.00 ms/percent webcore 0.00 called 2 times D/WebCore ( 8045): \*-\* Total Java callback (frame bridge) time: 5.00 ms/percent webcore 19.23 called 14 times D/WebCore ( 8045): \*-\* Total parsing (may include calcStyle, Java callback or inline script execution) time: 16.00 ms/percent webcore 61.54 called 1 times D/WebCore ( 8045): \*-\* Total layout time: 0.00 ms/percent webcore 0.00 called 1 times D/WebCore ( 8045): \*-\* Total native 1 (frame bridge) time: 1.00 ms/percent webcore 3.85 called 2 times D/WebCore ( 8045): \*-\* Total native 2 (resource load) time: 0.00 ms/percent webcore 0.00 D/WebCore ( 8045): \*-\* Total native 3 (shared timer) time: 0.00 ms/percent webcore 0.00 called 1 times D/WebCore ( 8045): \*-\* Total build nav (webview core) time: 0.00 ms/percent webcore 0.00 called 1 times D/WebCore ( 8045): \*-\* Total record content (webview core) time: 0.00 ms/percent webcore 0.00 D/WebCore ( 8045): \*-\* Total native 4 (webview core) time: 0.00 ms/percent webcore 0.00 called 4 times D/WebCore ( 8045): \*-\* Total draw content (webview ui) time: 0.00 ms D/WebCore ( 8045): \*-\* Total tryUpdateQueueWithBitmap (TransferQueue) time: 0.00 ms D/WebCore ( 8045): \*-\* Total blitTileFromQueue (TransferQueue) time: 0.00 ms D/WebCore ( 8045): \*-\* Total webkit\_TG\_CPU time: 0.00 ms D/WebCore ( 8045): \*-\* Total webkit\_UI\_CPU time: 0.00 ms D/WebCore ( 8045): Current cache has 0 bytes live and 0 bytes dead D/WebCore ( 8045): Current render arena takes 4099 bytes D/WebCore ( 8045): Current CSS styles use 632 bytes D/WebCore ( 8045): Current DOM nodes use 2504 bytes I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} I/ActivityManager( 178): Displayed com.facebook.katana/.ProxyAuthDialog: +462ms (total +542ms) I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} V/ActivityStack( 178): Prepare close transition: finishing ActivityRecord{41637bd0 com.facebook.katana/.ProxyAuthDialog} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} D/dalvikvm( 178): GC\_EXPLICIT freed 1508K, 27% free 12674K/17159K, paused 2ms+8ms I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} V/ActivityStack( 178): Prepare close transition: prev=ActivityRecord{41637bd0 com.facebook.katana/.ProxyAuthDialog} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=true} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} V/ActivityStack( 178): Prepare close transition: finishing ActivityRecord{415f7b38 com.facebook.katana/.ProxyAuth} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} V/ActivityStack( 178): Prepare close transition: prev=ActivityRecord{415f7b38 com.facebook.katana/.ProxyAuth} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} D/OpenGLRenderer( 8087): Flushing caches (mode 0) I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41753328 paused=false} D/dalvikvm( 8087): GC\_CONCURRENT freed 457K, 5% free 9622K/10119K, paused 3ms+3ms D/OpenGLRenderer( 8045): Flushing caches (mode 0) I/ActivityManager( 178): Displayed it.developername.appname/com.facebook.LoginActivity: +1s197ms D/OpenGLRenderer( 8045): Flushing caches (mode 1) D/dalvikvm( 8087): GC\_CONCURRENT freed 692K, 8% free 9567K/10375K, paused 2ms+2ms V/ActivityStack( 178): Prepare close transition: finishing ActivityRecord{41564038 it.developername.appname/com.facebook.LoginActivity} V/ActivityStack( 178): Prepare close transition: prev=ActivityRecord{41564038 it.developername.appname/com.facebook.LoginActivity} D/OpenGLRenderer( 8087): Flushing caches (mode 0) D/dalvikvm( 8087): GC\_CONCURRENT freed 510K, 8% free 9603K/10375K, paused 2ms+3ms D/NetworkController( 265): intent is = Intent { act=android.net.wifi.RSSI\_CHANGED flg=0x10000010 (has extras) } D/NetworkController( 265): mWifiConnected = true I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} D/dalvikvm( 178): GC\_CONCURRENT freed 1148K, 26% free 12703K/17159K, paused 2ms+6ms I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} I/WindowManager( 178): DIM BEHIND: Window{41818210 paused=false} D/NetworkController( 265): intent is = Intent { act=android.net.wifi.RSSI\_CHANGED flg=0x10000010 (has extras) } D/NetworkController( 265): mWifiConnected = true V/AlarmManager( 178): sending alarm Alarm{41526858 type 2 com.facebook.katana}

Thanks,

g

Anyway, I confirm that DocumentsDirectory is not available for reading - only for writing and this issue is about Facebook plugin and Social plugin.

g

Hi g I can confirm that system.DocumentsDirectory work for reading and writing as it works on all my apps

maybe I should share a test apk. Maybe there is something wrong in my devices.

Hi g I can confirm that system.DocumentsDirectory work for reading and writing as it works on all my apps

You have an error:

I/Corona ( 8087): File does not exist: ueue.png

I don’t know what ueue.png is, I don’t see it in your source code.  I suspect that you have an error selecting the filename and passing it to the function.  You should look at your functions you are using to create files in system.DocumentsDirectory and how you get those files there.  You need to look at your code that’s generating the filename to make sure it’s doing what you expect it to do.  You can use the “print” API to print out values to the console log and then you can look in that log to see what the values are.

Still having the same response. have ensured my Facebook settings are as per what they should be. 

Here is what I have.

FB-Settings.png

Code.png

unsure Rob and mmk as to why this issue is still ongoing, It appears the file is going into the system.DocumentsDirectory correctly but still not working.

I have enabled “Native or desktop app?” in Facebook and disabled it with the same response. 

In the screen shot above, you show a folder called Documents.  Is this your Corona SDK simulator sandbox?  It’s not the same folder as the Xcode simulator sandbox.

I accessed my /Users/danny_roerring/Library/Application Support/iPhone Simulator/7.1/Applications/2F58DD96-66B8-4D72-81B9-9354B15C80CB/BeetleJuice.app/BeetleJuice 

which I suspect is my Xcode Simulator Sandbox can can see 

Good catch the missing ueue.png into log.

It also is missing in the code because I changed some names before posting it, in order to make it more readable, that’s why they don’t match.

Anyway, the log says the image is missing and this is a fact. Now I should understand why!

thanks,

I rewrote everything and I add the functionality of screenshot saving and – EVERYTHING WORKS!

I don’t really know what did not work before and I am investigating about it.

Thanks to everybody!

g

@Savorok, what messages are you getting in your console log?  For the Xcode simulator you have to run the “Console” app to see it.

Hopefully I have done this right but here is the output attached (XCode.png)

Quick Note:

  1. Dose the application on Facebook need to be out of Developer mode or could that be causing it?

 

I checked and created a Test app within the Facebook portal and when using the app ID I get the following also attached (Example.png)

It looks to me like there is an issue with GameThrive based on what I could see.  Normally people will use their mouse and highlight the text in Xcode’s Organizer window and then do a Copy (CMD-C) and then come here and paste it in (CMD-V).  It’s really hard to make out what’s going on when you just screen shot the screen.

Perhaps you should consider asking this in the GameThrive sub-forum since the error seems related to them.

Rob

My apologies Rob I thought a screenshot might have been easier. Ignore the GameThrive it’s fully working so unsure as to why its generating this error but that’s another problem.

The image appears to be appearing in my “documents” directory. Renamed it to start with a lower case “f” to check this and worked fine so this cannot be the problem. Maybe you might be able to see something on the log that I cannot see. 

Jun 8 23:19:38 Dannys-MacBook-Pro.local SimulatorBridge[12203] \<Warning\>: Application launched after 0.00 seconds. Jun 8 23:19:39 Dannys-MacBook-Pro.local backboardd[12191] \<Error\>: HID: The 'Passive' connection 'BeetleJuice' access to protected services is denied. Jun 8 23:19:39 Dannys-MacBook-Pro.local BeetleJuice[14434] \<Warning\>: Platform: iPhone Simulator / x86\_64 / 7.1 / Apple Software Renderer / OpenGL ES 2.0 APPLE-9.4.3 Jun 8 23:19:39 Dannys-MacBook-Pro.local SpringBoard[12200] \<Warning\>: Remote notifications are not supported in the simulator Jun 8 23:19:39 Dannys-MacBook-Pro.local BeetleJuice[14434] \<Warning\>: Facebook Credits: false Jun 8 23:19:39 Dannys-MacBook-Pro.local BeetleJuice[14434] \<Warning\>: Twitter Credits: true Jun 8 23:19:39 Dannys-MacBook-Pro.local BeetleJuice[14434] \<Warning\>: AppDelegate.mm: didFailToRegisterForRemoteNotificationsWithError: remote notifications are not supported in the simulator Jun 8 23:19:39 Dannys-MacBook-Pro.local BeetleJuice[14434] \<Warning\>: Runtime error /Users/hiptic/Documents/GameThrive/SDK/Corona/SDK/shared/plugin\_GameThrivePushNotifications.lua:292: attempt to concatenate field 'token' (a nil value) stack traceback: /Users/hiptic/Documents/GameThrive/SDK/Corona/SDK/shared/plugin\_GameThrivePushNotifications.lua:292: in function \</Users/hiptic/Documents/GameThrive/SDK/Corona/SDK/shared/plugin\_GameThrivePushNotifications.lua:270\> ?: in function \<?:218\> Jun 8 23:19:50 Dannys-MacBook-Pro.local BeetleJuice[14434] \<Warning\>: Registration Successful Jun 8 23:20:04 Dannys-MacBook-Pro.local BeetleJuice[14434] \<Warning\>: WARNING: gameNetwork.init() was already called for gamecenter.

Edit: The above is with changing my file copy code to the following aswell, but like I said I can confirm the image is copied correctly.

[lua] --Read the exiciting FaceBookIcon from the resource directory (image is in same drector as my main.lua and other files)
–Read image and convert image to a binary form
local pathRead = system.pathForFile( “FaceBookIcon.jpg”,system.ResourceDirectory )
local file = io.open( pathRead, “rb” )
local imageData = file:read( “*a” )
io.close( file )

–Setup write directory to my documesnts directoy that my settings have been saved to
–Write the binary file and close and set FileStream back to nil
local pathWrite = system.pathForFile( “faceBookIcon.jpg”, system.DocumentsDirectory )
local file = io.open( pathWrite, “wb” )
file:write( imageData )
io.close( file )
file = nil[/lua]

EDIT: This works fine “facebook.request( “me/feed”, “POST”, { message=“Hello Facebook” } )” so it appears its defiantly picture related. 

You have an error coming from GameThrive:

Jun 8 23:19:39 Dannys-MacBook-Pro.local BeetleJuice[14434] <Warning>: Runtime error

    /Users/hiptic/Documents/GameThrive/SDK/Corona/SDK/shared/plugin_GameThrivePushNotifications.lua:292: attempt to concatenate field ‘token’ (a nil value)

    stack traceback:

        /Users/hiptic/Documents/GameThrive/SDK/Corona/SDK/shared/plugin_GameThrivePushNotifications.lua:292: in function </Users/hiptic/Documents/GameThrive/SDK/Corona/SDK/shared/plugin_GameThrivePushNotifications.lua:270>

        ?: in function <?:218>

 

The only difference I see in  your code and code I’ve tested multiple times that works is you’re providing a link and that may be causing your problem.  Link is not a valid option for “me/photos”.  See:

 

https://developers.facebook.com/docs/graph-api/reference/v2.0/user/photos

GameThrive dev here – That error normally happens because your iOS provisioning profile does not have push permissions on it, but in this case it’s probably happening because push notifications aren’t available on the simulator.

For either case, we’ll be releasing an update soon to have a better message displayed when this error is encountered.

The error happens in a callback, so it shouldn’t have any effect on other parts of your app.

It’s possible this error is because you are using an invalid permission name. Here’s what Facebook says about “publish_stream”:

Facebook used to have a permission called publish_stream. publish_actions replaces it in all cases. This permission also replaces photo_upload.

(https://developers.facebook.com/docs/facebook-login/permissions/v2.0)

 

 

So basically, you should replace publish_stream with publish_actions. Also, this permission now requires approval by Facebook to use. But hopefully it should still work in development mode without any special approval.