GithubHelp home page GithubHelp logo

silverstripe-facebookconnect's Introduction

Hi there πŸ‘‹

I'm a full stack web developer from Ōtautahi Christchurch, New Zealand. Available for freelance, consulting and contract work across any PHP (Silverstripe, Laravel, Wordpress) or Javascript projects (Node, React, etc)

Will's github stats

silverstripe-facebookconnect's People

Contributors

a2nt avatar alexandruz avatar andrelohmann avatar bimah avatar dullgiulio avatar emilberg avatar jyrkij avatar phillprice avatar wilr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

silverstripe-facebookconnect's Issues

Update PHP SDK.

The PHP SDK has been updated quite significantly. Module should use piston to manage the dependency to the PHP SDK library.

Login form crashes with framework 3.6.2

I just updated a project to latest versions of everything we have and silverstripe/framerwork 3.6.2 broke facebookconnect's login form changes. The error received is

[User Error] Uncaught Exception: Object->__call(): the method 'getfacebookpermissions' does not exist on 'Security', or the method is not public.
GET /Security/login?BackURL=%2Fadmin%2Fpages

Trace

    Object->__call(getFacebookPermissions,Array)
    FacebookLoginForm.php:25
    Security->getFacebookPermissions()
    FacebookLoginForm.php:25
    FacebookLoginForm->__construct(Security,FacebookLoginForm)
    ReflectionClass->newInstanceArgs(Array)
    InjectionCreator.php:17
    InjectionCreator->create(FacebookLoginForm,Array)
    Injector.php:555
    Injector->instantiate(Array)
    Injector.php:864
    Injector->get(FacebookLoginForm,,Array)
    Injector.php:902
    Injector->createWithArgs(FacebookLoginForm,Array)
    Object.php:142
    Object::create(FacebookLoginForm,Security,FacebookLoginForm)
    FacebookAuthenticator.php:31
    FacebookAuthenticator::get_login_form(Security)
    Security.php:388
    Security->GetLoginForms()
    Security.php:548
    Security->login(SS_HTTPRequest)
    RequestHandler.php:288
    RequestHandler->handleAction(SS_HTTPRequest,login)
    Controller.php:202
    Controller->handleAction(SS_HTTPRequest,login)
    RequestHandler.php:200
    RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
    Controller.php:158
    Controller->handleRequest(SS_HTTPRequest,DataModel)
    Director.php:385
    Director::handleRequest(SS_HTTPRequest,Session,DataModel)
    Director.php:149
    Director::direct(/Security/login,DataModel)
    main.php:191

It seems that FacebookLoginForm authenticator is never used on 3.6.1. (This isn't a problem for us as we use facebookconnect for other integrations.) The workaround for us is to disable FacebookAuthenticator in mysite/_config.php:

Authenticator::unregister('FacebookAuthenticator');

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

PAGE NOT FOUND after login

Hey, i'm getting 404 after i login and redirect back, could it be because i'm trying to test it localy ?

Facebook SDK issue

When installing via composer the master of the facebook sdk is cloned https://github.com/facebook/facebook-php-sdk-v4 - this now excludes some of the classes used by this module. I am thinking perhaps the sdk has changed since the module was last updated?

Doing a git checkout of the 4.0-dev branch seems to checkout the correct dependancies.

Multiple buttons on same page. Only the last one works

It seems that using multiple buttons on the same page causes only the last button to work, probably because a new request is routed to facebook for each , invalidating the earlier buttons. Would it be a solution to return the same link during the entire request, or would that result in other problems?

Bad syntax in ConnectInit.ss

Hey Will!

Firstly, thanks heaps for all your hard work on SS :)

you might want to get rid of the last , in the array... IE doesn't like it.

WRONG ---------
window.fbAsyncInit = function() {
FB.init({
appId : '$Top.FacebookAppId',
status : true,
cookie : true,
xfbml : true,
oauth : true, <- note comma here
});

CORRECT ----------
window.fbAsyncInit = function() {
FB.init({
appId : '$Top.FacebookAppId',
status : true,
cookie : true,
xfbml : true,
oauth : true
});

Config key api_secret, but usage for api and app_secret

Currently you are instructed to set api_secret but the module uses both api_secret and app_secret. Should probably be updated to instruct and use only app_secret as that's the correct term if I've understood Facebook correctly...

PHP error

I have following error after returned from facebook login.

[Recoverable Error] Argument 1 passed to FacebookMemberExtension::updateFacebookFields() must be an instance of GraphUser, instance of Facebook\GraphUser given

Not getting FB user details

Hi,

Having succesfully negotiated installing the plugin and getting the older FB SDK so it works, I am having an issue with getting the FB details into the Member table.

While the FacebookUID field get filled in, nothing else comes across from FB. The first time a user logins via FB it indicates that it is accessing email, public_profile and user_friends. I have manually set the sync_member_details to true, and left it out - it doesn't make a difference either way.

Additionally although I have set: member_groups: 'Shoppers' the user does not get added to this group.

Any pointers on where I am going wrong?

Cheers
D

Implement oAuth version of member login

Since using the javascript SDK for logging in is not hugely ideal since some applications may not want to be fully javascript based.

It would be nice if this had oAuth version to handle the login as well.

Facebook GraphUser does not include email address

Hi Team,

I've been having issues with logging into SilverStripe with Facebook Connect. It seems that the Graph User, that is returned in the FacebookConnectAuthCallback::connect() controller function, does not have an email address associated with it. First and Last name are also not set. Due to this, SilverStripe now creates a blank user whenever someone attempts to log in.

$user = (new FacebookRequest(
    $session, 'GET', '/me', array('fields' => implode(',', $fields))
))->execute()->getGraphObject(GraphUser::className());
var_dump( $user );

object(Facebook\GraphUser)#79 (5) {
["backingData":protected]=>
array(2) {
["name"]=>
string(15) "[REDACTED]"
["id"]=>
string(17) "[REDACTED]"
}
["class"]=>
NULL
["extension_instances":protected]=>
array(0) {
}
["beforeExtendCallbacks":protected]=>
array(0) {
}
["afterExtendCallbacks":protected]=>
array(0) {
}
}

I have noticed that as of August 7 2016, the Facebook Graph API version 2.0 is unavailable. It is quite possible that this change is causing the issues, and the SDK files may need to be updated.

Any assistance is greatly appreciated.
Shaun.

Error on Logout: "OAuthException: Error processing access token."

On logging out I get the following error:

[User Warning] OAuthException: Error processing access token.
GET /

Line 177 in C:\wamp\www\facebookconnect\code\FacebookConnect.php

On logout, there appears to be no logic to empty the session, so the next onBeforeInit (on page reload after logout) calls $this->facebook->api('/me'). this calls _graph which throws an exception and sets the session to null (line 455 of Facebook.php).

Since you never know if the user has logged out in the interim (and hence if the OAuth token is still valid) it seems that the user_error in FacebookConnect.php (line 177) should simply be removed.

Integrating with silverstripe-memberprofiles

Hi there,

Just wondering if anyone has successfully integrated facebook login with this module alongside silverstripe-memberprofiles? Any caveats that anyone has found?

Cheers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.