Anyway, I confirm that DocumentsDirectory is not available for reading - only for writing and this issue is about Facebook plugin and Social plugin.
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.
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,
g
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:
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.
Updated my previous post with a bunch of new info. Replying again to notify people subscribed to this thread.