@Emanuel unfortunately the problem is, that Facebook SDK v3 is completely different, and current Gideros Facebook API (which is based on Facebook SDK v2) is completely incompatible with Facebook SDK v3. So: 1) it would break existing apps 2) there is a need of time and workforce to do that, both now are dedicated to more urgent matters
But that might change if someone is willing to wrap Facebook SDK in Java and IOS wrappers with similar API to current
@ar2rsawseen @achimeno @anyone I have some issue with FB @ar2rsawseen's plugin integration at Android device. Under Eclipse everything looks fine, there is no errors. I can sign apk properly, I can also install apk on device, with no problem. But: - Just after running app with @ar2rsawseen's default example, when it's trying to connect with fb, I have an info about error: "Invalid android key parameter. The key [there is a key 28 chars] does not match any allowed key...[!] honestly I have six variations of these keys: with "=" on the end, from 28 to 31 chars etc... followed by different advices like for example from here: http://stackoverflow.com/questions/4388992/key-hash-for-android-facebook-app I have now 8 various hash keys and I'm going crazy @-) - I've spent already 12 hours on it... Please help me! Windows 7 x64 /Android 2.2 Froyo.
@ar2rsawseen Thanks! ok finally full success: it was one from my eight key hashes, but unfortunately I set too much on fb site yesterday evening it also works properly for me: http://stackoverflow.com/a/7564008
Hi @ar2rsawseen! Ok finally I can post and get scores, feeds to fb etc. But I've noticed some problem: when I beat a record during one session, it's received some error in lua:
start.lua:48: attempt to index field 't'(a boolean value)
stack traceback:
start.lua:48: infunction<start.lua:26>
in start.lua my code looks like:
if facebook:isSessionValid()then
facebook:graphRequest("me/scores")
facebook:addEventListener(Event.REQUEST_COMPLETE,
function(event)local t = Json.Decode(event.response)local Text = TextField.new(nil, "You have"..t.data[1].score.." scores!")
self:addChild(Text)end)end
There is no error at first attempt of:
facebook:graphRequest("me/scores")
etc. only at second when I change the scene from level.lua to start.lua page only after posting a new record..
@fxone yes, basically what happens is that retrieving score returns json with all the data, but submitting score returns value true. So what you would need to do is to expect any kind of result. Probably the easiest way is to check
if e.response ~="true"thenlocal t = Json.Decode(e.response)if t.data then--have your score result hereelseif e.response =="false"then--could not submit the scoreendend
Unfortunately there is no direct way to determine to which app requests we got the response for, at least current Facebook SKD does not provide it. So your best bet is to try to determine it based on the contents of response.
So right now there is only one REQUEST_COMPLETE event and you should try to combine everything in one event call if you can, like here handling both retrieving and submitting scores.
Help Please !!.. ive been staring at this for hours, ive followed the facebook setup, and imported and removed the Facebook SDK a few times as i cant get rid of these errors.
i have 2 screen shots showing each of the SDK projects with errors, and the build path looks ok.
also the reference to "GFacebook.fb.authorizeCallback(requestCode, resultCode, data);" has an error on "GFacebook".
Pleaseeee im running out of the bits of hair i had left.
@ArtLeeApps have you imported com.giderosmobile.android.plugins.facebook.GFacebook into your main activity?
I found that it also seemed to work when both Facebook SDK and your Gideros Facebook project folders are in the same workspace (basically in the same relative folder)
You must not add facebooksdk.jar but rather treat whole FacebookSDK project as a library and install it as described in installation instructions. As far as I know there are no more simple .jar files in facebook
@ar2rsawseen thank you, in the process of adding Facebook i imported the folder into my app, resulting in the facebook stuff overwriting the manifest and stuff.. so ive just done a full Gideros export, re-added, AdMob, Billing, and Facebook.. (and made notes on what i did )
Anyway, after moving the Facebook SDK folders to my workspace, and then importing that into eclipse, then added it as a Library to my project it was happy. all the sample facebook apps had issues, but i worked out, i had to add (android-support-v4.jar) as an external Jar to make them happy too
now its 2am here in the land of OZ so ill start trying to setup the bits to get my Facebook APP ID tommorrow, so i can post from my app... finally !
1) Unfortunately not, that is how facebook implemented their app, they did not leave an option to fallback, because it can only be determined within their own webview in facebook app. And it sucks. 2) most probably you could check usertimeline (or the wall) to see if the message is really there. You should check Facebook graph API for more info on this one
if i listen for CANCEL or COMPLETE and only award them if "COMPLETE" ?
(i cant test the theory till i get home from work "dammit"... even if i remote desktop to home i cant plug my phone in to test it... lol ill need to set up a permanent phone, plugged into my home laptop, and a remote Camera. remote desktop to home, compile and watch my phone on the camera... but till then !!! )
Which is the best version of this plugin - the github version or the labs version (they both have slightly different GFacebook.java files).
I also get this error: - GFacebook cannot be resolved
I've attached a screenshot, you should be able to see that the Facebook SDK has been installed properly (it's the SDK you provide, not the latest version from Facebook).
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Ah that might happen when you manage 3 or 4 different repositories with the same code Now let me check.
And that line that gives an error might be obsolete, because I think @atilim now passes the onActivityResult directly to the plugin, let me check that also
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
So:
1) it would break existing apps
2) there is a need of time and workforce to do that, both now are dedicated to more urgent matters
But that might change if someone is willing to wrap Facebook SDK in Java and IOS wrappers with similar API to current
@achimeno
@anyone
I have some issue with FB @ar2rsawseen's plugin integration at Android device. Under Eclipse everything looks fine, there is no errors. I can sign apk properly, I can also install apk on device, with no problem. But:
- Just after running app with @ar2rsawseen's default example, when it's trying to connect with fb, I have an info about error: "Invalid android key parameter. The key [there is a key 28 chars] does not match any allowed key...[!]
honestly I have six variations of these keys: with "=" on the end, from 28 to 31 chars etc... followed by different advices like for example from here:
http://stackoverflow.com/questions/4388992/key-hash-for-android-facebook-app
I have now 8 various hash keys and I'm going crazy @-) - I've spent already 12 hours on it... Please help me!
Windows 7 x64 /Android 2.2 Froyo.
ps. of course I've changed appId..
https://play.google.com/store/apps/developer?id=My+name+is+Originality
only replace it with your package name
Likes: fxone
https://play.google.com/store/apps/developer?id=My+name+is+Originality
only at second when I change the scene from level.lua to start.lua page only after posting a new record..
thanks in advance!
https://play.google.com/store/apps/developer?id=My+name+is+Originality
Likes: fxone
https://play.google.com/store/apps/developer?id=My+name+is+Originality
[edited Sorry, I've checked again]
event response nil
event response true
https://play.google.com/store/apps/developer?id=My+name+is+Originality
I've tried also some Corona solution, looking like (firstly removed
https://play.google.com/store/apps/developer?id=My+name+is+Originality
facebook:addEventListener(Event.REQUEST_COMPLETE
from facebook plugin? It looks like it holds value and ignores new attempt of request...
https://play.google.com/store/apps/developer?id=My+name+is+Originality
So what you would need to do is to expect any kind of result. Probably the easiest way is to check
So right now there is only one REQUEST_COMPLETE event and you should try to combine everything in one event call if you can, like here handling both retrieving and submitting scores.
Likes: fxone
https://play.google.com/store/apps/developer?id=My+name+is+Originality
Help Please !!.. ive been staring at this for hours, ive followed the facebook setup, and imported and removed the Facebook SDK a few times as i cant get rid of these errors.
i have 2 screen shots showing each of the SDK projects with errors, and the build path looks ok.
also the reference to "GFacebook.fb.authorizeCallback(requestCode, resultCode, data);" has an error on "GFacebook".
Pleaseeee im running out of the bits of hair i had left.
http://artleeapps.com/
Bubble Adventure - Colors
I found that it also seemed to work when both Facebook SDK and your Gideros Facebook project folders are in the same workspace (basically in the same relative folder)
You must not add facebooksdk.jar but rather treat whole FacebookSDK project as a library and install it as described in installation instructions. As far as I know there are no more simple .jar files in facebook
in the process of adding Facebook i imported the folder into my app, resulting in the facebook stuff overwriting the manifest and stuff.. so ive just done a full Gideros export, re-added, AdMob, Billing, and Facebook.. (and made notes on what i did )
Anyway, after moving the Facebook SDK folders to my workspace, and then importing that into eclipse, then added it as a Library to my project it was happy.
all the sample facebook apps had issues, but i worked out, i had to add (android-support-v4.jar) as an external Jar to make them happy too
now its 2am here in the land of OZ so ill start trying to setup the bits to get my Facebook APP ID tommorrow, so i can post from my app... finally !
Thanks again :-bd
http://artleeapps.com/
Bubble Adventure - Colors
When the code get to the "Authorize()"
it goes to a Web page not found.
and eclipse has this in the logs.....
08-05 21:55:47.642: W/dalvikvm(16663): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
08-05 21:55:47.642: W/dalvikvm(16663): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
08-05 21:55:47.652: I/dalvikvm(16663): Could not find method android.support.v4.content.LocalBroadcastManager.getInstance, referenced from method com.facebook.Session.postActiveSessionAction
08-05 21:55:47.652: W/dalvikvm(16663): VFY: unable to resolve static method 360: Landroid/support/v4/content/LocalBroadcastManager;.getInstance (Landroid/content/Context;)Landroid/support/v4/content/LocalBroadcastManager;
08-05 21:55:47.652: D/dalvikvm(16663): VFY: replacing opcode 0x71 at 0x0009
08-05 21:55:47.652: D/dalvikvm(16663): VFY: dead code 0x000c-0010 in Lcom/facebook/Session;.postActiveSessionAction (Ljava/lang/String;)V
08-05 21:55:47.812: D/dalvikvm(16663): GC_CONCURRENT freed 618K, 46% free 3483K/6407K, external 2K/514K, paused 3ms+11ms
08-05 21:55:47.852: D/MediaPlayer(16663): pause() in
08-05 21:55:47.862: D/MediaPlayer(16663): pause() out
08-05 21:55:47.872: D/AudioTrack(16663): Audio Track already stopped
http://artleeapps.com/
Bubble Adventure - Colors
- That now creates the feed for the user to "share".
1) is there a nicer way of handling an older version of facebook than to crash ? like if it fails to authorise show a dialog to the user ?
2) is there a way to know if the user "shared" or "cancelled". The reason i ask is, i am rewarding the user with a star if they post..
then ill let the facebook thing rest
Dislikes: DRS
http://artleeapps.com/
Bubble Adventure - Colors
2) most probably you could check usertimeline (or the wall) to see if the message is really there. You should check Facebook graph API for more info on this one
just a direct post in the background, if the user is logged in of course.
http://artleeapps.com/
Bubble Adventure - Colors
Event.DIALOG_CANCEL
Event.DIALOG_COMPLETE
if i listen for CANCEL or COMPLETE and only award them if "COMPLETE" ?
(i cant test the theory till i get home from work "dammit"... even if i remote desktop to home i cant plug my phone in to test it... lol
ill need to set up a permanent phone, plugged into my home laptop, and a remote Camera. remote desktop to home, compile and watch my phone on the camera... but till then !!! )
http://artleeapps.com/
Bubble Adventure - Colors
Also it most probably is possible to post something without the dialog.
Basically everything what is available with graph api is available to the plugin:
https://developers.facebook.com/docs/reference/api/
I also get this error: - GFacebook cannot be resolved
I've attached a screenshot, you should be able to see that the Facebook SDK has been installed properly (it's the SDK you provide, not the latest version from Facebook).
https://deluxepixel.com
Now let me check.
And that line that gives an error might be obsolete, because I think @atilim now passes the onActivityResult directly to the plugin, let me check that also
Likes: SinisterSoft
https://deluxepixel.com
And yes, there is no need to call GFacebook from ActivityResult anymore, updated the instructions accordingly
Likes: SinisterSoft