This error happens because com/giderosmobile/android/plugins/facebook/GFacebook is not found. Which is part of Gideros Facebook plugin. So probably you put it in some other place, not where it should be according to Android Studio. I think in Android studio they should be in \src\main\java\com\giderosmobile\android\plugins\facebook
So I managed to get the facebook SDK working with Android Studio.
As promised, here is the facebook integration guide. I wrote the guide as I completed each step / or on occasions when I had to redo a step again. It worked for me so I hope it works for the community too. Let me know if you have any issues or find any errors.
The guide is pretty comprehensive (and long) as I wanted to make it as clear as possible for new developers.
Enjoy.
doc
doc
How to set up Facebook plugin with Android Studio.doc
I will now start working on a complete Facebook Lua class that can be used by the community as well as provide the basis for basic to advanced facebook development tutorials.
function FacebookManager:sendAppRequests(params)ifnot params then
params ={message ="Check out this awesome app"}end
facebook:dialog("apprequests", params)end
I get the application request dialogue as expected. but when I click on the dialogue's cancel button my player crashes. How can I handle this button? I see that Event.DIALOG_CANCEL is now nil. Does this mean that the dialogue cancel event is no longer supported?
I can handle when the user clicks the small x as a dialogue error event is called.
Do you have a log with which your player crashes on cancel button? And yes there are only two events, Dialog complete and dialog error cancel should be dialog error with error message as Canceled
@ar2rsawseen Great! That has removed the error from my APK.
I also get a a dialogError callback event now with an e.type = "appRequest" and e.error = "error" when I execute the code in my custom player. This, I expected.
Presumably, error.getLocalizedMessage() is returning something (local characters) that cannot be handled, or am I wrong? If this is true, what is the best course of action?
A question oauth dialogue. Is there a purpose to the oauth didalog? When I call this:
facebook:dialog("oauth", params)
I get the dialogue, but with a message informing me that permissions have already been granted. The app has already logged in, but with minimal permissions (get) data. I want to get the user to authorise additional permissions (post data).
Should I use the login function again with the additional permissions?
As promised, here is a a Lua class implementation/wrapper for the Gideros facebook plugin.
1. Include it in your Gideros project 2. Create an instance in main or somewhere in your app setup logic using:
fb = FacebookManager.new("your app ID")
3. On successful login, _logInComplete will execute. Within this function there are many commented out function calls that test each feature. self:getProfile() is called by default.
NOTE: For the sake of simplicity this class does not include any event dispatching to calling scenes etc. The purpose is to help new users get up and running.
If you experience any issues, or you find any errors, please let me know.
@simwhi probably something with localization, I will change it to some default error text
And about oauth, when I implemented facebook plugin, I don't think there were oauth dialogs. But yeah, you probably don't need it, cause all authentication is done internally.
Just to keep you all abreast of new Facebook experimentation/development, I have now managed to get v3.23.1 of the SDK working in Android Studio. This SDK uses a version of the Graph API that will be deprecated in July 2017 rather than v3.14 which will be deprecated in August 2016.
Also, with my new found knowledge of Android Studio, adding the FB dependency is much easier now. To update the SDK make the following changes to your app's build.gradle file.
Hi @simwhi like you said " I'm obviously missing something, or the instructions are out of date, or both!!" I've tried to implementing facebook android in my project but still nothing :-/
Hi @simwhi like you said " I'm obviously missing something, or the instructions are out of date, or both!!" I've tried to implementing facebook android in my project but still nothing :-/ ... images Somebody to support me thanks!!!
Has used somebody this plugin currently? Is facebook android plugin working? I appreciate any help, thanks you
Yes, this works fine. (ticking facebook in the plugin selection panel)
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
I think that the facebook SDK v3.23.1 using Graph API v2.2 has now been deprecated. How difficult / time consuming would it be to upgrade to the latest version of the SDK?
I vaguely recall not being able to use anything above v3.32.1.
Comments
I think in Android studio they should be in \src\main\java\com\giderosmobile\android\plugins\facebook
As promised, here is the facebook integration guide. I wrote the guide as I completed each step / or on occasions when I had to redo a step again. It worked for me so I hope it works for the community too. Let me know if you have any issues or find any errors.
The guide is pretty comprehensive (and long) as I wanted to make it as clear as possible for new developers.
Enjoy.
Likes: talis, antix, mertocan, bali001, pie, HubertRonald
Likes: talis
I can handle when the user clicks the small x as a dialogue error event is called.
And yes there are only two events, Dialog complete and dialog error
cancel should be dialog error with error message as Canceled
https://github.com/gideros/gideros/blob/master/plugins/Facebook/source/Android/jni/gfacebook.cpp#L262-L263
which means somewhere in this class null is passed to onDialogError:
https://github.com/gideros/gideros/blob/master/plugins/Facebook/source/Android/src/com/giderosmobile/android/plugins/facebook/GFacebook.java#L412
I suspect it could be this line:
https://github.com/gideros/gideros/blob/master/plugins/Facebook/source/Android/src/com/giderosmobile/android/plugins/facebook/GFacebook.java#L424
can you try to change it to something else like:
I also get a a dialogError callback event now with an e.type = "appRequest" and e.error = "error" when I execute the code in my custom player. This, I expected.
Presumably, error.getLocalizedMessage() is returning something (local characters) that cannot be handled, or am I wrong? If this is true, what is the best course of action?
facebook:dialog("oauth", params)
I get the dialogue, but with a message informing me that permissions have already been granted. The app has already logged in, but with minimal permissions (get) data. I want to get the user to authorise additional permissions (post data).
Should I use the login function again with the additional permissions?
1. Include it in your Gideros project
2. Create an instance in main or somewhere in your app setup logic using:
NOTE: For the sake of simplicity this class does not include any event dispatching to calling scenes etc. The purpose is to help new users get up and running.
If you experience any issues, or you find any errors, please let me know.
Enjoy!!
Likes: pie, jdbc, HubertRonald
And about oauth, when I implemented facebook plugin, I don't think there were oauth dialogs. But yeah, you probably don't need it, cause all authentication is done internally.
Likes: antix
Just to keep you all abreast of new Facebook experimentation/development, I have now managed to get v3.23.1 of the SDK working in Android Studio. This SDK uses a version of the Graph API that will be deprecated in July 2017 rather than v3.14 which will be deprecated in August 2016.
Also, with my new found knowledge of Android Studio, adding the FB dependency is much easier now. To update the SDK make the following changes to your app's build.gradle file.
1. Add this before dependencies
Enjoy!
like you said " I'm obviously missing something, or the instructions are out of date, or both!!"
I've tried to implementing facebook android in my project but still nothing :-/
My struct project is
My AppActivity is
My app's build.gradle
My manifest
My string file
Permisions.java
GFacebook.java
GFacebook.java (again)
I've got it these erros
Somebody to support me thanks!!!
[-] Liasoft
Is facebook android plugin working?
I appreciate any help, thanks you
[-] Liasoft
Follow the guide as provided in the link posted above. If you experience any issues you can post here again.
Likes: SinisterSoft, antix, simwhi
https://deluxepixel.com
I've only changed
Likes: simwhi
[-] Liasoft
http://giderosmobile.com/forum/discussion/6741/gideros-2016-10-released#Item_64
Because I wanted to be more confident about it before commenting on your answer
Thanks again
P.D. I'm using Gideros 2017.3.1
[-] Liasoft
I think that the facebook SDK v3.23.1 using Graph API v2.2 has now been deprecated. How difficult / time consuming would it be to upgrade to the latest version of the SDK?
I vaguely recall not being able to use anything above v3.32.1.