What is a good implementation of Facebook API on a mobile device? - ios

I'm making an app with xamarin.iOS using Facebook API to login but I would like to know if my app should make the connection to the Facebook api or should I make a call to my asp net mvc webapi and let my backend make the connection to the Facebook API.
so here are the 2 concept :
mobile communicate directly with facebook api and after send the data to my asp webapi
or mobile request asp webapi then webapi make a request to facebook api
wich concept should I take ?

From mobile user prospective, it is better to use Facebook SDK for iOS in the mobile app so that the experience stays native all the way.
Remember, iOS supports Facebook even without Facebook app installed.
Facebook SDK for iOS takes care of all this.
After you login, you can send your token to the Web API and then use it.
Here are some articles and videos that will help you getting started:
Facebook iOS SDK for Xamarin - Getting started
Video: Login with Facebook in Xamarin Forms

Related

Is it possible to integrate the Facebook login without using the iOS SDK?

Currently i am using the Facebook SDK to implement the Facebook login to our native iOS application. For this i am using the native iOS SDK for Facebook. This application is both for mobile and web, so is it possible to integrate Facebook login without using the SDK from application side. I mean authentication done fully through API and server side.
Please have a suggestion.
I referred to a SO link:
Design for Facebook authentication in an iOS app that also accesses a secured web service
Sure! You can always use their API directly, which essentially is the same as they do with the SDK.
Check out the documentation on the following link.
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow

Integrate facebook account with user account in my iOS application

I'm using Facebook iOS SDK 4.0 in my iOS application. I want to integrate Facebook accounts with the user profile of my application. It is used for sharing purpose and I want the integration to be maintained for the user across multiple devices. As remote token cache was deprecated in Facebook iOS SDK 4.4, is it safe that I save the Facebook access token to my server directly through a web service? Is there any method I should follow in saving so? It would be very helpful if you provide some sample code.

Using (Venmo) OAuth API with Ionic Framework

I'm currently having some issues using the Venmo API in the context of an app built on the Ionic framework. I'm currently building an Ionic app, which uses the Venmo OAuth API, and trying to test it out on my iPhone. My Venmo authentication flow currently goes like this: I use the Cordova "In App Browser" plugin to open the Venmo OAuth sign-in page in-app, which redirects the user back to my app with a query parameter specifying an access token, allowing me to make requests to Venmo's API endpoints on the user's behalf. When I run my Ionic app on my Mac (via ionic serve) and access it via a web browser, I'm able to use the OAuth API (as you would expect). However, when I run my app on my iPhone, I can't get the app to work with OAuth API because the Venmo authorization page, opened with the In App Browser plugin, can't redirect back to my app. Again, this flow works in browser, but it fails on my iPhone.
To my knowledge, it looks like the OAuth API is the only way I can interact with Venmo through an Ionic app. This is presenting a problem because the "In App Browser" plugin doesn't allow Venmo's authorization page to redirect back to my app when testing on an iPhone. I'm open to trying this process any other way. I see in the Venmo docs that there's an iOS SDK but I don't think I can use that in any way in an Ionic app. If someone has an example of authenticating with other OAuth services in an Ionic app, that would also be helpful. Thanks in advance.

How to use same Facebook app id in many ios applications

How to use same Facebook app for different ios application. I'm using facebook graph api 2.0 and i refered Nextpeer document. How to redirect the ios application from the facebook application using a customized URLscheme like fb39877767662comcompanynamegame

Gmail API 0Auth 2.0 using OAuth Phonegap SDK

Has anyone had success in using the Gmail API's authorization in a Phonegap application? I found this (http://phonegap-tips.com/articles/google-api-oauth-with-phonegaps-inappbrowser.html) that describes using the generic Google API OAuth with Phonegap's inappbrowser plugin, but the newly released Gmail API does OAuth authorization differently, and I'm not sure how to get it to work with Phonegap.
Note: It does work when I try a web version of my app, but the button that brings up the authorization screen doesn't do anything in Phonegap..not sure why. I do have the appropriate Android credentials for the app in the Google Developer's Console.
UPDATE: Using OAuth's Phonegap SDK (found after registering your app here: https://oauth.io/), I am able to authenticate a Google Account. However, I am unsure how to then call Gmail API methods or correctly pass whatever authentication tokens from the OAuth SDK to any Gmail API code. Has anyone done this and can share their knowledge?
I found a solution using the OAuthio Phonegap SDK. Then I can call the appropriate HTTPS requests from the Gmail API.
If you want to login your users via Google on iOS and Android, then use this new plugin I just created: https://github.com/EddyVerbruggen/cordova-plugin-googleplus
You will also receive the name and gender etc from the plugin. The plugin will also try SSO with any other Google apps installed on your device by using the Google+ SDK on both platforms.

Resources