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

Security warning #21

Closed
kieranpaul opened this issue Jul 15, 2014 · 11 comments
Closed

Security warning #21

kieranpaul opened this issue Jul 15, 2014 · 11 comments

Comments

@kieranpaul
Copy link

I can get this working in the browser but I keep getting a Security warning in my phonegap app?

I'm sure if I am setting my Facebook app up correctly.

Any help would be must appreciated :)

@vomchik
Copy link

vomchik commented Jul 29, 2014

i have the same problem (((

@vomchik
Copy link

vomchik commented Jul 29, 2014

@kieranpaul I install new InAppBrowser plugin http://plugins.cordova.io/#/package/org.apache.cordova.inappbrowser
After this everything works )))

@ryanicle
Copy link

ryanicle commented Aug 2, 2014

I still have the same issue even after installing Cordova InAppBrowser plugin. Is there anything that I should do?

@vomchik
Copy link

vomchik commented Aug 2, 2014

No, i just install plugin.
But, i have suspicion that plugin not loading. Check your config.

@ryanicle
Copy link

ryanicle commented Aug 3, 2014

@vomchik Thanks! I got this working now. This is what I did.

$ cordova plugin add https://github.com/phonegap/phonegap-facebook-plugin

In config.xml, I added

<gap:plugin name="com.phonegap.plugins.facebookconnect">
 <param name="APP_ID" value="YOUR_FACEBOOK_APP_ID" />
 <param name="APP_NAME" value="YOUR_FACEBOOK_APP_NAME" />
</gap:plugin>

@Louis777
Copy link

I have tried all solutions on this thread and many others, none seem to help me. I am getting the Success Security Warning message on my android device. It works very well on my browser (I am using Visual Studio 2013 update 4).

I do have the following:

InAppBowerser version 1.0.0, installed as a plugin
On my FB Dev. Setting -> Basic I have: http://localhost:4437/
Om my FB Dev. Setting -> Advance I have: https://www.facebook.com/connect/login_success.html
Side Notes:

Initially I was getting "the redirect_uri is not supported", I fixed this by placing:

runningInCordova = true;
right after this

document.addEventListener("deviceready", function () {
runningInCordova = true;
alert("runningInCordova");
}, false);

in the OpenFB.js file, since on my adroid device the above listener was not executing. This now gives me access to the FB login screen.

But after login in I get the Success Security Warning message. I have spent 3 days trying to resolved this issue. I have tried many, many things but nothing seems to works. I am sure there is a solution out there.

Is there a way to fix this?

Please help, Thank you in advance.

Louis

@xgenem
Copy link

xgenem commented May 12, 2015

I am willing to help since I have already faced this issue. Can you send a
snippet of your code?
On Tue, May 12, 2015 at 9:15 AM Louis777 notifications@github.com wrote:

I have tried all solutions on this thread and many others, none seem to
help me. I am getting the Success Security Warning message on my android
device. It works very well on my browser (I am using Visual Studio 2013
update 4).

I do have the following:

InAppBowerser version 1.0.0, installed as a plugin
On my FB Dev. Setting -> Basic I have: http://localhost:4437/
Om my FB Dev. Setting -> Advance I have:
https://www.facebook.com/connect/login_success.html
Side Notes:

Initially I was getting "the redirect_uri is not supported", I fixed this
by placing:

runningInCordova = true;
right after this

document.addEventListener("deviceready", function () {
runningInCordova = true;
alert("runningInCordova");
}, false);

in the OpenFB.js file, since on my adroid device the above listener was
not executing. This now gives me access to the FB login screen.

But after login in I get the Success Security Warning message. I have
spent 3 days trying to resolved this issue. I have tried many, many things
but nothing seems to works. I am sure there is a solution out there.

Is there a way to fix this?

Please help, Thank you in advance.

Louis


Reply to this email directly or view it on GitHub
#21 (comment).

@Louis777
Copy link

I would really appreciate your help:

Here is how I call it:
openFB.init({ appId: '5555555555555', tokenStore: window.localStorage });
openFB.api({
path: '/me',
success: function (data) {
console.log(JSON.stringify(data));
document.getElementById("userFBID").innerHTML = data.id;
document.getElementById("userFullName").innerHTML = data.name;
document.getElementById("userEmail1").innerHTML = data.email;
SetDBConn();
},
error: errorHandler
});

My openfb.js is the same the one you posted here:

https://github.com/eugenemaning/openfb.js/blob/master/openfb.js

with the exception that I had to add [ runningInCordova = true; ] after the addEventListener, since it doesn't seem to execute when running in my Android device, the code now looks like this:

document.addEventListener("deviceready", function () {
    runningInCordova = true;
}, false);
runningInCordova = true;  //I added to make sure it know that we are running Cordova

If I don't add it, it says: [ the redirect_uri is not supported ]

Thanks in advance.

Louis

@Louis777
Copy link

I am sorry for being a pest, but I can't find any solution for my issue. It seems to be a very easy solution, but I can't find it. I've spend many days on this already.

Please help.

@ccoenraets
Copy link
Owner

If you had to manually add runningInCordova = true, it probably means you didn't include cordova.js in index.html:

<script src="cordova.js"></script>

Note: cordova.js doesn't have to be available (and shouldn't be) in your www folder. It is automatically injected by the Cordova build process.

Also make sure you have the inappbrowser plugin installed:

cordova plugins add org.apache.cordova.inappbrowser

@superandrew
Copy link
Contributor

I am having this problem, too. I am literally cursing myself for using this library. I am using inappbrowser, I was forced to set runningInCordova = true because in android it didn't get recognized (I am building with pg:build)

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

7 participants