Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

appery login after facebook oauth

Looking for guidence on this as it not included in the tutorial

I have the oauth facebook login working and I need to use the response to login to appery.io db.

(the User name and User email are showing in alert on screen after fb login "User name: xxxxxx User email: xxxxxxx@zzzzzzzzz)

I added 2 response paramaters to the fb Post service and mapped them to textinputs on the screen, but there not showing?

unsure if this is the correct approach.

the service does work as I can see the message posted on the timeline and the user name and email are alerts on the screen

Here are some screenshots

Image

Image

Image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

appery login after facebook oauth

Hi Michael,

Could you please post a screenshot of service response in browser network tab?

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

appery login after facebook oauth

Hi Katya,
how can I show you this in browser, it only works on device, and shows nothing in wienre on iphone

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

appery login after facebook oauth

Katya,
this is network tab in wienre and the graph service is ok, but return doesnt show in app, happy to show anything you think will help.

thanks

Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

appery login after facebook oauth

Hi Michael,

Please show us following screen shots:

  1. Show screen shot with service request: http://prntscr.com/4loun7/direct

  2. Your service "settings" tab and "request" tab.

    Regards.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

appery login after facebook oauth

Hi,
here are the screenshots requested

thanks

http://prntscr.com/4loun7/direct is just blank when clicked

Image Image Image

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

appery login after facebook oauth

Hi Katya,
any idea whats wrong here?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

appery login after facebook oauth

Hi Michael,

Here is what you have to do to get your service work:

1 Open "getFeed" service settings.

2 Set URL with following value: http://prntscr.com/4lz9ui/direct

pre

https://graph.facebook.com/me/feed

/pre

3 Navigate to request tab and add "access_token" request parameter. http://prntscr.com/4lzaat/direct

4 Open this service datasource mapping and navigate to request tab. Then add link from "accessToken" lsv to "access_token" request parameter. http://prntscr.com/4lzazg/direct

That's all in this case your service should work.

Also you can add "success" event handler for this datasource and populate it with following code:

pre

//This will print response to console.
console.log(data);

/pre

Regards.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

appery login after facebook oauth

Hi,
I dont have a getFeed service although I can create it,
after fb login access_token is returned in an alert with this code

codeOAuth.popup('facebook', function(error, result) {
if (error) {
alert(error); // do something with error
return;
}

result.get('/me').done(function(data) {

Code: Select all

 alert("User name: " + data.name + ". User email: " + data.email); 

  facebook_service.execute({data:{ 
      "user_id":data.id, "access_token":result.access_token 

  }}); 

});
});/code

and on success of facebookRest service (message to timeline) with the following

Image

I tried to save access token to lsv by adding the following pice of code to the above and tested in weinre, but after alerts I just get the spinner spinning

Image

How do I save the access token from the returned alert to lsv?

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

appery login after facebook oauth

can anyone help here?

thanks

Return to “Issues”