Resource icon

Social Network Authentication (Twitter, Google, VK.com) 1.0

No permission to download
BTW, my Twitter intergration no longer works. Server logs are filled with oauth errors. Not sure if others are experiencing problems. I wasn't aware until some testing today and the server logs. Checked the box next to Sign in with Twitter in the dev center at Twitter, but no luck.
 
@guiltar one quick question. Once Twitter is integrated to an account and you want to go disassociate that account, you are not seeing the account details of the connected Twitter account.

Do we need to set the permanent array or change up the getProfile function to accept the user id?

I simply could add:
PHP:
    /**
    * Getting the Permanent User Profile Data
    *
    * @param arary $profile
    *
    * @return array
    */
    public function getPermanentUserInfo(array $profile)
    {
        return array(
            'username'    => (isset($profile['username']) && !empty($profile['username']))? $profile['username']: '',
            'profile_url' => (isset($profile['profile_url']) && !empty($profile['profile_url']))? $profile['profile_url']: '',
            'avatar_url'  => (isset($profile['avatar_url']) && !empty($profile['avatar_url']))? $profile['avatar_url']: ''
        );
    }

And it would work, but I know that the data is not "permanent" per say...
 
I found a solution to my last post but I ran into a new error. When users try to associate their account with twitter they get an "Unknown Account" response where their twitter account name should be and the url is https://twitter.com/#!/. Any solution to this?
 

Attachments

  • twitter-screen-capture.webp
    twitter-screen-capture.webp
    25.1 KB · Views: 9
Associated my twitter with the new upgrade and now it says unknown account instead of my Twitter name:
Screen Shot 2013-06-13 at 8.00.20 PM.webp


It did let me login with twitter authorization. It doesn't automatically do it tho unlike Facebook. It brings you to the twitter page first.

Also sometimes when you try to login with Twitter you get this page:

Screen Shot 2013-06-13 at 8.01.48 PM.webp
 
It did let me login with twitter authorization. It doesn't automatically do it tho unlike Facebook. It brings you to the twitter page first.

Also sometimes when you try to login with Twitter you get this page:

Yeah it does the same thing for me too. It works fine just that it shows Unknown Account in your profile, that's the only issue
 
Yeah, true. To fix that I have to figure out how it's possible to do unsigned requests to new API.
Since user should see this page correctly without granting access.

getPermanentUserInfo is for info that will never change. For google it's email.
It's exactly for this page, since google doesn't allow unsigned requests.
 
Always got this error:

Code:
ErrorException: Undefined index: oauth_token - library/Social/Extra/twitteroauth/twitteroauth.php:114

Code:
#0 /home/phcorner/public_html/library/Social/Extra/twitteroauth/twitteroauth.php(114): XenForo_Application::handlePhpError('KSWImsQfaGZjk0P...')
#1 /home/phcorner/public_html/library/Social/Provider/Oauth/Twitter.php(39): TwitterOAuth->getAccessToken('http://www.phco...')
#2 /home/phcorner/public_html/library/Social/Provider/Abstract.php(14): Social_Provider_Oauth_Twitter->getAccessToken('http://www.phco...')
#3 /home/phcorner/public_html/library/Social/ControllerPublic/Register.php(38): Social_Provider_Abstract->authenticate(Object(Social_Provider_Oauth_Twitter))
#4 /home/phcorner/public_html/library/Social/ControllerPublic/Register.php(391): Social_ControllerPublic_Register->_getProviderResponse()
#5 /home/phcorner/public_html/library/XenForo/FrontController.php(313): Social_ControllerPublic_Register->actionTwitter(Object(XenForo_RouteMatch))
#6 /home/phcorner/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch()
#7 /home/phcorner/public_html/index.php(13): XenForo_FrontController->run()
#8 {main}


Code:
array(3) {
  ["url"] => string(153) "http://www.phcorner.net/register/twitter?oauth_token=9TUpsOAqZOys36ZPRwWizE7es7ndZUtOvnZPT3km10&oauth_verifier=KSWImsQfaGZjk0PHmwzRGjM6phf22FeuW7I1b2Bpp0"
  ["_GET"] => array(2) {
    ["oauth_token"] => string(42) "9TUpsOAqZOys36ZPRwWizE7es7ndZUtOvnZPT3km10"
    ["oauth_verifier"] => string(42) "KSWImsQfaGZjk0PHmwzRGjM6phf22FeuW7I1b2Bpp0"
  }
  ["_POST"] => array(0) {
  }
}
 
Back
Top Bottom