• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Twitter Authentication (new)

guiltar

Well-known member
INSTALLATION:
1. Upload files
2. Import XML
3. Create twitter application http://dev.twitter.com/apps and put its Consumer Key and Consumer Secret to addon's options.

FEATURES:
1. Registration of a new account via Twitter
2. Association of an old account with Twitter account

NOTES:
1. If user tries to uses several providers same time he can get problems http://xenforo.com/community/threads/user_id-key-within-xf_user_external_auth.24776/
2. Complete removal of the addon will leave twitter users without password.
 

Attachments

miuiru

Member
for me not working :(
Code:
Zend_Oauth_Exception: Could not retrieve a valid Token response from Token URL: <?xml version="1.0" encoding="UTF-8"?> <hash> <error>Desktop applications only support the oauth_callback value 'oob'</error> <request>/oauth/request_token?oauth_consumer_key=xyyfDvVx1azg0d0zlnyuw&amp;oauth_nonce=e916f05b7c3203cc162a3462d68918b4&amp;oauth_timestamp=1326620363&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_version=1.0&amp;oauth_callback=http%3A%2F%2Fmiuirussia.com%2Fregister%2Ftwitter%3Fredirect%3Dhttp%253A%252F%252Fmiuirussia.com%252F&amp;oauth_signature=N3SILXDo3DXccvXT5E%2FPm4Yl9Zg%3D</request> </hash> - library/Zend/Oauth/Http.php:234
 
must set up the oauth properly dont think this is an error with mod but could be wrong, try removing your call back url off the twiter app page.
 

Mutt

Well-known member
are we going to run into issues when xen adds twitter support?

anyway, nice work & thanks
 

guiltar

Well-known member
are we going to run into issues when xen adds twitter support?
When xen adds twitter it should with disabled addon since addon is written exactly like native facebook.
In the worst case we will just need to rename fields in database and it will work.

But be careful with complete removal. For now uninstall method will remove all associated twitter data.
If xen adds native twitter I will change uninstall method to remove it without data loss.
 

polle

Active member
Can you please share the setup for the twitter app ?

For WebSite what to use, forum url or main site url ?
For CallBack URL ?

Thanks.
 

guiltar

Well-known member
Can you please share the setup for the twitter app ?

For WebSite what to use, forum url or main site url ?
For CallBack URL ?

Thanks.
You have to use main site url like http://xenforo.com
Also you have to check that Board URL is set correctly in Basic Board Information:
Code:
http://xenforo.com but not http://xenforo.com/
And also you have to check server time synchronisation:
http://blainegarrett.com/2009/07/14/failed-to-validate-oauth-signature-and-token-on-twitter-oauth-check-your-cloc/
 

polle

Active member
Thanks.

So for WebSite, the main site url and not site.com/forum.
CallBack URL nothing.

Correct ?
 

Mutt

Well-known member
When xen adds twitter it should with disabled addon since addon is written exactly like native facebook.
In the worst case we will just need to rename fields in database and it will work.

But be careful with complete removal. For now uninstall method will remove all associated twitter data.
If xen adds native twitter I will change uninstall method to remove it without data loss.
thanks, very cool
 

Brogan

XenForo moderator
Staff member
I need to have the login image in other language, how can I change that ?
If the Twitter login API supports multiple languages then it should be possible to utilise the data-lang variable:
Code:
data-lang="{xen:helper twitterLang, $visitorLanguage.language_code}"
The developer will need to add that to the add-on.
 

polle

Active member
When clicking the sign in with twitter, it goes to register/twitter?reg=1 and nothing happens. I just get a xenforo error, "a server error ocurred, try later".

Any advice ?
 

Mutt

Well-known member
Also you have to check that main site url is set correctly in Basic Board Information:
I left the main site url blank so the Home tab isn't displayed. will that work or do I need to actually enter the url?
 

Mutt

Well-known member
ok, I set the main site url & I'm still getting the auth error. i'm concerned that it may be that my root index is really just a redirect to the /xen/ dir. i'm running xenporta

in the meantime I'm checking server time sync
 

Mutt

Well-known member
i'll try again later. with the homepage url set & server time sync enables I still get the following error when trying to log in

Code:
Could not retrieve a valid Token response from Token URL: Desktop applications only support the oauth_callback value 'oob' /oauth/request_token?oauth_consumer_key=NhxkNx34v6Mb6U0Mq6Wjw&oauth_nonce=fdaabdff5ff9af2fd9de7744e4bb6804&oauth_timestamp=1326814638&oauth_signature_method=HMAC-SHA1&oauth_version=1.0&oauth_callback=http%3A%2F%2Fwww.sternfannetwork.com%2Fxen%2Findex.php%3Fregister%2Ftwitter%26redirect%3Dhttp%253A%252F%252Fwww.sternfannetwork.com%252Fxen%252Findex.php%253Fforum%252F&oauth_signature=%2FaIzhfH7%2BVH4h%2FnjlH%2FoeUSuiHw%3D
 
Top