Replies to the old forum questions:
First of all thank you for your interest and sorry for the late reply
@zwacky: I deeply edited the documentation, is it more straightforward now?
@mango: thank you for your feedback, I'll check out Yahoo
Yahoo! provider added as requested and main post updated
Thanks for sharing, cerbero90!
I know first hand how time-consuming it is to implement these types of integration, so your contribution is greatly appreciated.
keep it up, this will be a big help for us newbies!
@jgarifuna: you're very welcome :) I can work on it only in weekends, this is why I release weekly updates
@riggscastro: thanks, I'm glad you find this package useful :)
Added Facebook API helpers to manage Applications. Main post updated
Added Facebook API helpers to manage Checkins and Comments. Main post updated
thanks karev :)
If somebody needs a specific implementation of OAuth providers or API helpers, please let me know
Hey cerebro90, great package! Was completely frustrated when I realized Anvard wasn't in development anymore, and using HybridAuth itself didn't feel very well integrated with Laravel. A few questions:
Again, thank you for this package! :)
Hi ArcticZero :) you can be very flexible about it and don't need specific fields or tables to store user information.
The package offers simple methods to gather the data you need, then you can store them wherever you want.
For example:
$id = Facebook::id();
$email = Facebook::email();
$user = Auth::user();
$user->fb_id = $id;
$user->email = $email;
$user->save();
If you want to allow login from multiple providers, is there a simple way to have a different redirect_uri for each provider, or some way to detect in your redirect function which provider the redirect came from? By the way, great package, thanks a lot!
Is there any documentation for this package other than what's on the bitbucket wiki? If not, I would suggest adding the following: For Facebook, you can run the functions in the PHP SDK by chaining them on Facebook::client(). For example, to run the function getUserAccessToken in the SDK, you would do:
Facebook::client()->getAccessToken();
Also, when making API calls, you might want to check for an expired access token. I think that the only way to do this is to make an API call and see if you get back an OAuthException. Something like this:
try
{
$fb_email = Facebook::email();
$fb_id = Facebook::id();
}
catch(Exception $e)
{
return Redirect::to(Facebook::request('email'));
}
Also, might be good to put this in your logout function:
Facebook::client()->destroySession();
Sorry for the lack of updates, I'm very busy in this period.
@emerson5 you can find the route you're looking for in Cerbero / Oauth / routes.php For the time being, if you want to add more logic to it, feel free to copy & edit it. I'm going to fire an event with the next update.
You may call client()
with every provider, that allows you to be more flexible,
thank you for your suggestions, I will update the package and documentation as soon as possible :)
hello,
thank you for the excellent package :) however, I am wondering, from the quick example,
$google = Google::request('email');
could I ask for calendar permissions from here as well? like
$google = Google::request('email','calendar');
and for
$id = Google::id();
$email = Google::email();
May I know other than id and email, where can I find the other methods that I can use as well? For example could I get the profile picture?
Thanks!
Hi kensim86,
sure you can :) have a look at https://developers.google.com/google-apps/calendar/auth to find out what are the scopes.
id()
and email()
are just shortcuts, you may access every client method via Google::client()->method();
This is the Google client: https://github.com/google/google-api-php-client/blob/master/src/Google/Client.php
I'm running into an error in my application that includes this package when deployed to Heroku:
Class 'Cerbero\Oauth\Oauth' not found
It works fine in my local environment, and when I remove this package, everything in the rest of my application works. It's pretty tough to troubleshoot, because I can't repeat the error locally. I've tried running artisan dump-autoload and artisan optimize in the heroku shell after deploying, but I still get that error. Has anyone else run into this? Any ideas?
I'm having the same problem as emerson5, works locally but will not work live (Fortrabbit), same exception:
Class 'Cerbero\Oauth\Oauth' not found
Anyone have a solution for this?
Hi
I try to run the composer, but I have this error
Package facebook/php-sdk is abandoned, you should avoid using it. Use facebook/php-sdk-v4 instead.
And I can't to use this package.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community