Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this really working #2

Open
danieljulia opened this issue Oct 23, 2013 · 26 comments
Open

Is this really working #2

danieljulia opened this issue Oct 23, 2013 · 26 comments

Comments

@danieljulia
Copy link

Is this script really working?
In this case, what do you need to put on config host,
if it's running on the mobile not in the server?

@nithijai
Copy link

nithijai commented Nov 6, 2013

Yes. It works fine in phonegap 2.9.0.
Dear Furini,
Everything goes fine except FB logout. Its not works fine. Kindly give me a suggestions regarding this.

thanks,
Nithi

@ollenot
Copy link

ollenot commented Nov 13, 2013

Hi, I can't redirect to my app after I accept the permissions, Would I like to know what is my error in the config:

           //Config Plugin
                var config = {
                    app_id      : '', // I put the app ID 
                    secret      : '',// I put the secret
                    scope       : 'publish_stream,email',
                    host        : '', // I putted a valid host, but I dont know what the necessary content to this host. I just put a blank page.
                    onLogin     : _onLogin,
                    onLogout    : _onLogout
                };

After the permissions, instead the user come back to my app, it redirect to error page HTTP 404.

My app is in SandBox.

Thanks

@ollenot
Copy link

ollenot commented Nov 13, 2013

My app is in SandBox, but I am using test users.

Tks

@davidedonattini
Copy link

hi
i use phone gap 3.1 and with iOS and its work only on second time, the first XCODE give this error:

The operation couldn’t be completed. (NSURLErrorDomain error -999.)

anybody help me?

thanks

@davidedonattini
Copy link

the sandbox mode is disabled!

@rakeshostwal
Copy link

How to set host?
What host means here?

@dfrojas
Copy link

dfrojas commented Dec 4, 2013

I have test it, and looks does not working this plugin...

@rakeshostwal
Copy link

I tested it, I am able to hit facebook login api> But because of host name, I am unable to access the access token return in response from Facebook Login API

@netalex
Copy link

netalex commented Dec 4, 2013

so it work with 3.1 and actual fb api? great!

@rakeshostwal
Copy link

Yes so far. It hits the Facebook API. But how to handle response is still unclear for me.

See the issue details I have Posted: #4

@vonbv
Copy link

vonbv commented Jan 3, 2014

Is there an update about the question regarding the redirect issue? I'm experiencing a similar issue where I get the following error message after I log in in facebook:

"The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

I am using the same APP Id and secret that is working on our site that I called using the InAppBrowser. What could be the possible issue? Is it in InAppBrowser, is it that FB cannot redirect back to our site because it's inside a "parent element" that is the inappbrowser?

@varae
Copy link

varae commented Mar 17, 2014

I tried this facegap plugin for my phonegap 2.4 and 2.9 versions of android apps. But its not working. I want to login facebook through my app. As furini said needs to use inapp Browser to login facebook. Can you please give me example how can i use inapp Browser. Thanks in Advance

@varae
Copy link

varae commented Mar 17, 2014

Thankyou for your reply Sir, i registered as facebook developer and i had
App id, here i am attaching your code, just i am copy and paste your code
in my script tag thats it.

which host name i will have given for ( eg: www.minddotss.com), this is my
host name. Where i can paste this
$ (document) FaceGap ('fb_api' _fb).;

Please guide me.

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 6:01 PM, furini [email protected] wrote:

I am currently without time to analyze your code,
about InAppBrowser is present within the plugin
to use simply set and call:
$ (document) FaceGap ('fb_api' _fb).;

Possible problems:

  • Register the app developer on Facebook
  • Set app facebook login as web and not as Mobile
  • Host

Daniel Furini
Thank you,

2014-03-17 4:56 GMT-03:00 varae [email protected]:

I tried this facegap plugin for my phonegap 2.4 and 2.9 versions of
android apps. But its not working. I want to login facebook through my
app.
As furini said needs to use inapp Browser to login facebook. Can you
please
give me example how can i use inapp Browser. Thanks in Advance

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37791552>
.

Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-37809829
.

<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() {
//Config Plugin
var config = {
    app_id      : 'XXXXX',
    secret      : '54785c244db4a7604eeee6cb2fea5d06',
    scope       : 'publish_stream,email',

    onLogin     : _onLogin,
    onLogout    : _onLogout
};

//Login Facebook
$(document).FaceGap(config);
//Logout Facebook
//$(document).FaceGap('logout');

//Callback Login
function _onLogin( event ){     
    alert('status > '+event.status); // 1 - success, 0 - error
    alert('data > '+event.data); //Object response (id, name, email, etc);
    alert('token > '+event.token); // token user login
    alert('message > '+event.message);  
}

//Callback Logout
function _onLogout( event ){
    alert('status > '+event.status); // 1 - success, 0 - error
    alert('message > '+event.message);
}   

}

//Function callback response
function _callback( event ){
alert('_callback status > '+event.status);
alert('_callback data > '+event.data);
alert('_callback message > '+event.message);
}

//Config Object FB API
var _fb = {
    path    :   '/me/friends',
    method  :   'GET',
    params  :   { limit : 5 },
    cb  :   _callback //Function callback response
};

//Get FB API
$(document).FaceGap('fb_api', _fb); 

});
</script>

@varae
Copy link

varae commented Mar 17, 2014

Thanks for sending the reference code. I will update you Sir once i will
configure everything.

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 6:57 PM, furini [email protected] wrote:

Attached a javascript file
test and send me the answer script,

note:

  • Check that including JQuery

Daniel Furini

2014-03-17 10:12 GMT-03:00 varae [email protected]:

Thankyou for your reply Sir, i registered as facebook developer and i had
App id, here i am attaching your code, just i am copy and paste your code
in my script tag thats it.

which host name i will have given for ( eg: www.minddotss.com), this is
my
host name. Where i can paste this

$ (document) FaceGap ('fb_api' _fb).;

Please guide me.

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 6:01 PM, furini [email protected]
wrote:

I am currently without time to analyze your code,
about InAppBrowser is present within the plugin
to use simply set and call:
$ (document) FaceGap ('fb_api' _fb).;

Possible problems:

  • Register the app developer on Facebook
  • Set app facebook login as web and not as Mobile
  • Host

Daniel Furini
Thank you,

2014-03-17 4:56 GMT-03:00 varae [email protected]:

I tried this facegap plugin for my phonegap 2.4 and 2.9 versions of
android apps. But its not working. I want to login facebook through
my
app.
As furini said needs to use inapp Browser to login facebook. Can you
please
give me example how can i use inapp Browser. Thanks in Advance

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37791552>
.

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37809829>
.

<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() {

//Config Plugin
var config = {
app_id : 'XXXXX',
secret : '54785c244db4a7604eeee6cb2fea5d06',
scope : 'publish_stream,email',

onLogin : _onLogin,
onLogout : _onLogout
};

//Login Facebook
$(document).FaceGap(config);
//Logout Facebook
//$(document).FaceGap('logout');

//Callback Login
function _onLogin( event ){
alert('status > '+event.status); // 1 - success, 0 - error
alert('data > '+event.data); //Object response (id, name, email, etc);
alert('token > '+event.token); // token user login
alert('message > '+event.message);
}

//Callback Logout
function _onLogout( event ){
alert('status > '+event.status); // 1 - success, 0 - error
alert('message > '+event.message);
}
}

//Function callback response
function _callback( event ){
alert('_callback status > '+event.status);
alert('_callback data > '+event.data);
alert('_callback message > '+event.message);
}

//Config Object FB API
var _fb = {
path : '/me/friends',
method : 'GET',
params : { limit : 5 },
cb : _callback //Function callback response
};

//Get FB API
$(document).FaceGap('fb_api', _fb);

});
</script>

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37813105>

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-37814407
.

@varae
Copy link

varae commented Mar 17, 2014

I was just calling the html like this
fb Login
(or)
fb Login

Logcat shows the following error :

Typeerror: result of expression is not a function , undefined
$(document).FaceGap(config);
Typeerror: result of expression is not a function , undefined
$(document).FaceGap('fb_api', _fb);

please clarify me. first time i am integrating facebook with Phonegap

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 8:09 PM, furini [email protected] wrote:

It was nothing

2014-03-17 11:34 GMT-03:00 varae [email protected]:

Thanks for sending the reference code. I will update you Sir once i will
configure everything.

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 6:57 PM, furini [email protected]
wrote:

Attached a javascript file
test and send me the answer script,

note:

  • Check that including JQuery

Daniel Furini

2014-03-17 10:12 GMT-03:00 varae [email protected]:

Thankyou for your reply Sir, i registered as facebook developer and i
had
App id, here i am attaching your code, just i am copy and paste your
code
in my script tag thats it.

which host name i will have given for ( eg: www.minddotss.com), this
is
my
host name. Where i can paste this

$ (document) FaceGap ('fb_api' _fb).;

Please guide me.

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 6:01 PM, furini [email protected]
wrote:

I am currently without time to analyze your code,
about InAppBrowser is present within the plugin
to use simply set and call:
$ (document) FaceGap ('fb_api' _fb).;

Possible problems:

  • Register the app developer on Facebook
  • Set app facebook login as web and not as Mobile
  • Host

Daniel Furini
Thank you,

2014-03-17 4:56 GMT-03:00 varae [email protected]:

I tried this facegap plugin for my phonegap 2.4 and 2.9 versions
of
android apps. But its not working. I want to login facebook
through
my
app.
As furini said needs to use inapp Browser to login facebook. Can
you
please
give me example how can i use inapp Browser. Thanks in Advance

Reply to this email directly or view it on GitHub<

https://github.com/studiosoton/faceGap/issues/2#issuecomment-37791552>

.

Reply to this email directly or view it on GitHub<

https://github.com/studiosoton/faceGap/issues/2#issuecomment-37809829>

.

<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() {

//Config Plugin
var config = {
app_id : 'XXXXX',
secret : '54785c244db4a7604eeee6cb2fea5d06',
scope : 'publish_stream,email',

onLogin : _onLogin,
onLogout : _onLogout
};

//Login Facebook
$(document).FaceGap(config);
//Logout Facebook
//$(document).FaceGap('logout');

//Callback Login
function _onLogin( event ){
alert('status > '+event.status); // 1 - success, 0 - error
alert('data > '+event.data); //Object response (id, name, email,
etc);
alert('token > '+event.token); // token user login
alert('message > '+event.message);
}

//Callback Logout
function _onLogout( event ){
alert('status > '+event.status); // 1 - success, 0 - error
alert('message > '+event.message);
}
}

//Function callback response
function _callback( event ){
alert('_callback status > '+event.status);
alert('_callback data > '+event.data);
alert('_callback message > '+event.message);
}

//Config Object FB API
var _fb = {
path : '/me/friends',
method : 'GET',
params : { limit : 5 },
cb : _callback //Function callback response
};

//Get FB API
$(document).FaceGap('fb_api', _fb);

});
</script>

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37813105>

.

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37814407>

.

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37821967>

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-37822545
.

@varae
Copy link

varae commented Mar 17, 2014

I just copy and paste your files, and update app id, auth and host. When i
run this app in android device it shows alert messages like
_callback status>0
_callback data> null
_callback message>No user in session

message> code: 191 message: redirect_uri isn't an absolute URI. check RFC
3986

i can't take screens.

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 10:02 PM, furini [email protected] wrote:

add my facebook please:
https://www.facebook.com/daniel.furini.7

2014-03-17 12:55 GMT-03:00 varae [email protected]:

I was just calling the html like this
fb Login
(or)
fb Login

Logcat shows the following error :

Typeerror: result of expression is not a function , undefined
$(document).FaceGap(config);
Typeerror: result of expression is not a function , undefined
$(document).FaceGap('fb_api', _fb);

please clarify me. first time i am integrating facebook with Phonegap

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 8:09 PM, furini [email protected]
wrote:

It was nothing

2014-03-17 11:34 GMT-03:00 varae [email protected]:

Thanks for sending the reference code. I will update you Sir once i
will
configure everything.

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 6:57 PM, furini [email protected]
wrote:

Attached a javascript file
test and send me the answer script,

note:

  • Check that including JQuery

Daniel Furini

2014-03-17 10:12 GMT-03:00 varae [email protected]:

Thankyou for your reply Sir, i registered as facebook developer
and i
had
App id, here i am attaching your code, just i am copy and paste
your
code
in my script tag thats it.

which host name i will have given for ( eg: www.minddotss.com),
this
is
my
host name. Where i can paste this

$ (document) FaceGap ('fb_api' _fb).;

Please guide me.

Thanks,
Varalakshmi

On Mon, Mar 17, 2014 at 6:01 PM, furini <
[email protected]>
wrote:

I am currently without time to analyze your code,
about InAppBrowser is present within the plugin
to use simply set and call:
$ (document) FaceGap ('fb_api' _fb).;

Possible problems:

  • Register the app developer on Facebook
  • Set app facebook login as web and not as Mobile
  • Host

Daniel Furini
Thank you,

2014-03-17 4:56 GMT-03:00 varae [email protected]:

I tried this facegap plugin for my phonegap 2.4 and 2.9
versions
of
android apps. But its not working. I want to login facebook
through
my
app.
As furini said needs to use inapp Browser to login facebook.
Can
you
please
give me example how can i use inapp Browser. Thanks in
Advance

Reply to this email directly or view it on GitHub<

https://github.com/studiosoton/faceGap/issues/2#issuecomment-37791552>

.

Reply to this email directly or view it on GitHub<

https://github.com/studiosoton/faceGap/issues/2#issuecomment-37809829>

.

<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() {

//Config Plugin
var config = {
app_id : 'XXXXX',
secret : '54785c244db4a7604eeee6cb2fea5d06',
scope : 'publish_stream,email',

onLogin : _onLogin,
onLogout : _onLogout
};

//Login Facebook
$(document).FaceGap(config);
//Logout Facebook
//$(document).FaceGap('logout');

//Callback Login
function _onLogin( event ){
alert('status > '+event.status); // 1 - success, 0 - error
alert('data > '+event.data); //Object response (id, name, email,
etc);
alert('token > '+event.token); // token user login
alert('message > '+event.message);
}

//Callback Logout
function _onLogout( event ){
alert('status > '+event.status); // 1 - success, 0 - error
alert('message > '+event.message);
}
}

//Function callback response
function _callback( event ){
alert('_callback status > '+event.status);
alert('_callback data > '+event.data);
alert('_callback message > '+event.message);
}

//Config Object FB API
var _fb = {
path : '/me/friends',
method : 'GET',
params : { limit : 5 },
cb : _callback //Function callback response
};

//Get FB API
$(document).FaceGap('fb_api', _fb);

});
</script>

Reply to this email directly or view it on GitHub<

https://github.com/studiosoton/faceGap/issues/2#issuecomment-37813105>

.

Reply to this email directly or view it on GitHub<

https://github.com/studiosoton/faceGap/issues/2#issuecomment-37814407>

.

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37821967>

.

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37822545>

.

Reply to this email directly or view it on GitHub<
https://github.com/studiosoton/faceGap/issues/2#issuecomment-37832515>

.

Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-37837287
.

@magic1979
Copy link

hi all,
thanks a lot for this script, is very cool
i have a problem with logout,you can advice me how can i put correctly? i use phone gap 3.5 and xcode for IOS application, work all for login but i can't exit in logout, give me error 0 and unknown error in description

Regards
Salvatore

@vineelsunny
Copy link

Hai..can you show a tutorial on how to actually use the facegap plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

12 participants