- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Something is happened now with my app, because when I try to login with fecebook I get the message that that the given url is not allowed by the application and this works before, think that I have to add a web platform to my facebook app but what is the site url that I have to enter here or if is another solution let me know, I am getting this issue in Android and in IOS do not show the message but doesn't work too.
function facebook_login(){
	    var fbLoginSuccess = function (userData) {
	        //alert("UserInfo: " + JSON.stringify(userData));
	        //get info
	        facebookConnectPlugin.api("me/?fields=id,email,first_name,last_name,name,link,website,address", ["public_profile"],
	            function (result) {
	                fb_alias = result.name.toString().toLowerCase().replace(' ', '');
	                //get user by alias
	                $.ajax({
	                    type: 'POST',
	                    url: rest_url + 'mobile/get_user/' + '?callback=?',
	                    data: {id:null, alias:fb_alias},
	                    success: function(data){
	                        data = $.parseJSON(data);
	                        if(data.status == 'success'){ //exists
	                            is_login = 'yes';
	                            window.localStorage.setItem('biipit_is_login', is_login);
	                            user = data.message[0];
	                            window.localStorage.setItem('biipit_user', JSON.stringify(user));
	                            window.localStorage.setItem('biipit_user_id', user.id);
	                            if(user.account_type == 'B'){
	                                $.mobile.changePage('#business_profile', {transition:'flip'});
	                            }else{
	                                $.mobile.changePage('#personal_profile', {transition:'flip'});
	                            }
	                        }else{ //new register
	                            fb_email = result.email;
	                            window.localStorage.setItem("biipit_reg_email", fb_email);
	                            //create password
	                            fb_password = 'biipit';
	                            window.localStorage.setItem("biipit_reg_pass", fb_password);
	                            //submit data
	                            $.mobile.loading('show');
	                            $.ajax({
	                                type: 'POST',
	                                url: rest_url + 'mobile/profile/' + '?callback=?',
	                                data: {
	                                    mode:'facebook',
	                                    account_type:'P',
	                                    alias:fb_alias, 
	                                    alias:fb_alias, 
	                                    email:fb_email, 
	                                    password:fb_password,
	                                    first_name:result.first_name,
	                                    last_name:result.last_name,
	                                    facebook_profile:result.link,
	                                    personal_profile:result.id
	                                },
	                                success: success_profile,
	                                error: error
	                            });
	                        }
	                    },
	                    error: error
	                });
	            },
	            function (error) {
	                //alert("Failed: " + error);
	            }
	        );
	    };
	    //check login status
	    facebookConnectPlugin.getLoginStatus(
	        function(result){
	            if(result.status == 'connected'){
	                fbLoginSuccess(result);
	            }else{
	                //login
	                facebookConnectPlugin.login(["public_profile"],
	                    fbLoginSuccess,
	                    function (error) { 
	                        alert("" + JSON.stringify(error)); 
	                    }
	                );
	            }
	        }, function(error){
	                alert('Failed: ' + JSON.stringify(error));
	        }
	    );
	}
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have attached screenshots of my XDK facebook settings, my developer.facebook.com settings, and my project itself. Hopefully you can see what you are doing incorrectly from them :)
Once built, it allows you to login with fb and post to your wall.
Link Copied
- « Previous
- 
						- 1
- 2
 
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nope is the same issue by the way now I tested in both devices Android and IOS in Android get the same error and in IOS don't show nothing but doesn't work too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can we stick to one platform at a time please? Focusing on one issue at a time makes it clearer to debunk what you are doing wrong. Try getting iOS working first based on the screenshots I posted earlier. That is all you should need. Make sure the values on your facebook developer account match what you are giving to the XDK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad you got it working :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi if you want to made this works on Android devices what is the steps then?
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey somebody have an idea what is Android KeyHash because to made this works on Android I need that
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you now works in both IOS and Android.
Thank You.
 
					
				
				
			
		
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
- 
						- 1
- 2
 
- Next »