- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hey can some body help me with this, I try to get email and public profile from facebook app, I included the plugin cordova facebook connect and enter my App ID and App Name, but when nothing happens when I execute this function, do not show nothing, thank you in advance.
function facebook_login(){
//get login status
facebookConnectPlugin.getLoginStatus(fbLoginSuccess,
function (error){
alert("" + error);
}
);
var fbLoginSuccess = function(data){
alert(data);
if(data.status == 'connected'){
//get info
facebookConnectPlugin.api(data.userID + "/?fields=email", ["public_profile"],
function(result){
var form = document.getElementById('registerform');
form.email.value = data.email;
window.localStorage.setItem('fb_first_name', result.first_name);
window.localStorage.setItem('fb_last_name', result.last_name);
//load create_account_page
$.mobile.changePage('#create_account', {transition: 'flip'} );
},
function(error){
alert('Failed ' + error);
}
);
}else{
alert(data);
facebookConnectPlugin.login(["email", "public_profile"],
fbLoginSuccess,
function (error) { alert("" + error) }
);
}
}
}
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Check this screens, when I try to login on facebook, and here is the new code, please help ASAP.
function facebook_login(){
var fbLoginSuccess = function (userData) {
alert("UserInfo: " + JSON.stringify(userData));
//get info
facebookConnectPlugin.api("me/?fields=id,email", ["public_profile"],
function (result) {
alert("Result: " + JSON.stringify(result));
},
function (error) {
alert("Failed: " + error);
}
);
}
facebookConnectPlugin.login(["public_profile"],
fbLoginSuccess,
function (error) {
alert("" + JSON.stringify(error));
}
);
}
Thank You!
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
You are required to provide a hashkey in your Facebook application. For more information about the creation of key hashes, visit the following links as a startingpoint:
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I'm just getting this error in the chrome log when debuggon on a physical device and using AppPreview:
Uncaught ReferenceError: facebookConnectPlugin is not defined
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
So the facebook plugin only works when you do a full build and deploy to a phone. It doesn't work when you use the Debug tab. So the question is how are you supposed to use the debugger when you've got FB integrated as it seems to be be rather useless now?. :\
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
JOHN H. (Intel) wrote:
Yes, you must build your app to use the fb plugin.
So the app is built as crosswalk for android but I'm seeing the Invalid facebook keys error still. Where do I set/get the key?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Can you provide some screenshots? You can refer to this article as well.
https://software.intel.com/en-us/xdk/article/facebook-connect-plugin-android-ios
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi Amrita. I tried again this morning and it worked. I created a new test facebook app on developers.facebook.com but this time I didn't add the android platform to the app as I did in the previous one. I guess that's what might have caused the issue.
Thanks again.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I think there is still an issue here. Here's what happens.
1. Build android app and deploy to device.
2. FB connect works, my app is connected to the user.
3. I make another build (same FB_APP_ID etc.), remove the first original build from the phone and redeploy.
4. FB connect plugin has a login status of 'unknown' as opposed to 'connected' before. The FB window is also now shown with "This app has no Android key hashes configured. Configure your app key hashes at...".
So how do users receive updated versions of the app without removing it from their facebook settings first? I don't understand.
