How to use facebook api with Yii? - facebook-graph-api

I want to integrate facebook login with my Yii application. How can I integrate facebook api to Yii? Could not find any tutorial.

You could use this extension: http://www.yiiframework.com/extension/chybridauth/
If you don't want to use the above extension:
I suggest you follow the Getting Started with the Facebook SDK for PHP tutorial. Combined with the information and example code about Authentication and Authorization on the Yii website you should be able to create your own Facebook authentication.

Related

Laravel Socialite using for getting tokens only?

My question is Laravel Socialite using for getting tokens only?
For example, I want make Facebook post thought API.
I cant find any methods in Socialite docs. Does it means, that Socialite using only for getting tokens?
As I see in https://socialiteproviders.com/, thats only auth additions.
As auth, it response basic user information, but if you need make full API list, you need find another solution.
I find solution, but I want explain my task:
I need use Instagram API through Facebook.
Facebook has PHP SDK for using Facebook API, with examples, which arent show any instagram cases with API using. I didnt manage Instagram API with Facebook SDK.
And I cant find any working solutions using Facebook SDK.
So, in my case, I am using Laravel Socialite for generate redirect URL and access token.
And then I am using manual HTTP client for Instagram API with token from Socialite.

Login using Google+ on a Django Site

Hi everyone I want to put a google+ login button on my website (coded in django) w/o using any 3rd party tool like Django-Social-Auth, etc.
So can anyone point me to some tutorial or help me how to do it. I want user to login via Google+ and then I can get their information at backend in django views. I will be then hosting it on Google App Engine so if some GAE API can help me then it will also be great.
I figured out the solution:
Got access_token using https://developers.google.com/+/web/signin/javascript-flow
Then send out the access_token to Server for getting User Details, considering these security measures (https://developers.google.com/+/web/signin/client-to-server-flow).
Use Django CSRF Token functionality to send token safely (https://docs.djangoproject.com/en/dev/ref/contrib/csrf/).

Django Angular Facebook authentication

I want to do a very simple web app where you can log-in using your facebook account.
I am very comfortable with the django framework and also angularjs. I have an idea how to integrate these two using tastypie api framework for django.
So if I am correct django's backend would be throwing some JSON which can be used by angularjs and so on.
Where I am confused is the authentication mechanism with facebook.
How do I integrate the Facebook's authentication with my app ?
What would be a good design for such an app ?
I am not expecting a complete design or architecture for my app from anyone , but some direction so that I can go forward with the app .
Thanks :)
I wrote a small article on this subject as it seems it was not clearly explained anywhere. I found it easily done with django-rest-framework instead of tastypie though.
Here are the main steps used to authenticate (I’ll try to add a little schema to illustrate) :
On the angular side, user authenticate on facebook with Oauth.io API (it could be directly with Facebook js API).
Client gets a Facebook authentication token.
FB token is used to ask for authentication on server side.
python-social-auth authenticate with FB with the given token.
django-rest-framework sends back to client a auth token for REST API calls.
Angular client passes the token in headers when making API calls.
You can find my article here about facebook angularjs auth with a django rest backend
This repo is designed with php on authenticate server side but it has all of the facebook login code you would need for angular. It should give you an overall idea of how to get started:
https://github.com/Terumi/AngularJS-Facebook-Login

Login API for Prestashop

I am working on a iOS Project in which I am using the prestashop API. Please let me know is there any API for login?
You can use the PrestaShop webservices and filter with email and password like below:
http://localhost/api/customers/?filter[email]=pub#prestashop.com&filter[passwd]=19160794b7c0b413e80f58298a8d8200
You should not store the COOKIE_KEY of your store in your app, you should make a PHP page to give you the hashed password.
Mostly use REST API for Login & OTP details. Remaining method can use SOAP API. For prestashop doesn't have api for build mobile apps. Apphitect have readily built API for Prestashop iOS app. Click Here

webservice + facebook-connect

I'm working on a project that consist in an IOS App and a webservice written using django-piston. Right now I'm using basic HTTP Auth use the webservice. Any idea of how can i integrate facebook connect to authenticate users to use the webservice?
Regards,
Emmet
It depends on if you want to authenticate from your iOS app or your web service.
For the iOS app, you can use the iOS SDK:
http://developers.facebook.com/docs/reference/iossdk/authentication/
If you authenticate from here, you should be able to get an authentication token via HTTP if you need to grab information on your web service. If you post more details I'll try to address them.