SMFHacks.com

SMF Gallery Pro => Support => Topic started by: pavelk on February 16, 2016, 07:22:27 am

Title: Failed connect to twitter
Post by: pavelk on February 16, 2016, 07:22:27 am
I'm create a twitter application in http://dev.twitter.com/apps
and paste Twitter Consumer Key and Twitter Consumer Secret
in settings to the current fields,
try sign and get error
Quote
I can not connect to Twitter. Refresh the page and try again. - 401
What did I do wrong or forgotten?
Title: Re: Failed connect to twitter
Post by: SMFHacks on February 16, 2016, 07:54:52 am
Just want to check what SMF version and you are using the latest gallery version right?
Title: Re: Failed connect to twitter
Post by: pavelk on February 16, 2016, 09:32:37 am
Just want to check what SMF version and you are using the latest gallery version right?
SMF 2.0.11 and  SMF Gallery Pro 7.1
Title: Re: Failed connect to twitter
Post by: SMFHacks on February 16, 2016, 10:10:10 am
According to twitter that is bad login information for error 401
https://dev.twitter.com/overview/api/response-codes

http://stackoverflow.com/questions/19095257/using-twython-to-send-a-tweet-twitter-api-error/19196583#19196583
Title: Re: Failed connect to twitter
Post by: pavelk on February 16, 2016, 12:45:55 pm
According to twitter that is bad login information for error 401
https://dev.twitter.com/overview/api/response-codes

http://stackoverflow.com/questions/19095257/using-twython-to-send-a-tweet-twitter-api-error/19196583#19196583
only set permissions from "Read and Write" to "Read, Write and Access direct messages" in twitter application?
I'm do it, but it's now work yet.
Title: Re: Failed connect to twitter
Post by: SMFHacks on February 16, 2016, 12:59:08 pm
Same error?
Title: Re: Failed connect to twitter
Post by: pavelk on February 16, 2016, 01:21:17 pm
Same error?
yes. 401.
I'm test python script - work.
But in python script I'm must specify the  "Access Token" and "Access Token Secret", not only "Twitter Consumer Key" and "Twitter Consumer Secret" such as in gallery twitter settings!
#####
##+##
#####
in smf log:
Quote
/index.php?action=gallery;sa=twittersignin
8: Undefined index: oauth_token
file /Sources/twitteroauth.php
where it sets?
Title: Re: Failed connect to twitter
Post by: pavelk on February 19, 2016, 05:01:52 am
2х :(
Somebody tell me where to "Access Token" and "Access Token Secret" setup?
Title: Re: Failed connect to twitter
Post by: SMFHacks on February 19, 2016, 08:10:30 am
https://dev.twitter.com/oauth/overview/application-owner-access-tokens
Title: Re: Failed connect to twitter
Post by: pavelk on February 26, 2016, 12:40:42 am
https://dev.twitter.com/oauth/overview/application-owner-access-tokens
Where  "Access Token" and "Access Token Secret" sets for gallery?
In gallery settings only
"Twitter Consumer Key"
"Twitter Consumer Secret"
sets.
Title: Re: Failed connect to twitter
Post by: SMFHacks on February 26, 2016, 08:30:43 am
In the smf_settings table.   Normally the system auto gets them after you click signin once you have the consumer keys set...
Title: Re: Failed connect to twitter
Post by: pavelk on February 27, 2016, 07:15:17 am
In the smf_settings table.   Normally the system auto gets them after you click signin once you have the consumer keys set...
The gallery_oauth_token' and 'gallery_oauth_token_secret' variable.

I'm set them manually, but has errors in log any way :(
Quote
8: Undefined index: oauth_token
and
Quote
8: Undefined index: oauth_token_secret
Title: Re: Failed connect to twitter
Post by: SMFHacks on February 27, 2016, 02:48:38 pm
Hmm make sure when inserting into the smf_setting table it is called
gallery_oauth_token
gallery_oauth_token_secret
Title: Re: Failed connect to twitter
Post by: pavelk on February 27, 2016, 03:45:14 pm
Hmm make sure when inserting into the smf_setting table it is called
gallery_oauth_token
gallery_oauth_token_secret
Yes, I'm set it, but any way get 401 error, and after fields reset to zero
 :-\
Title: Re: Failed connect to twitter
Post by: pavelk on December 14, 2016, 06:42:24 am
well... error not fixed  :(
Title: Re: Failed connect to twitter
Post by: pavelk on February 08, 2017, 01:56:12 am
I'm upgrade SMF Gallery to 7.2.2? but see message
Quote
I can not connect to Twitter. Refresh the page and try again. - 401
:(
Title: Re: Failed connect to twitter
Post by: SMFHacks on February 08, 2017, 06:33:18 am
Still need to look into and do some testing they might have made an api change.
Title: Re: Failed connect to twitter
Post by: SMFHacks on February 08, 2017, 01:14:49 pm
Figured it out it is a twitter issue you have to edit your twitter app.

Screenshot below

Enter this for callback: http://www.yourforum.com/gallerytwittercallback.php
Title: Re: Failed connect to twitter
Post by: pavelk on February 09, 2017, 04:12:51 am
Figured it out it is a twitter issue you have to edit your twitter app.

Screenshot below

Enter this for callback: http://www.yourforum.com/gallerytwittercallback.php
I'm got
Quote
Error 500 - Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.
because the permissions on the file were not installed correctly (for galleryaviary.php and gallerytwittercallback.php). I`m set it to 644 and login in twitter!  :D
But I do not understand what opportunities are now opened for me!
What new opportunities does the authorization on Twitter?
Title: Re: Failed connect to twitter
Post by: SMFHacks on February 09, 2017, 08:42:28 am
You can setup categories in the gallery when a picture is uploaded it autotweets to your twitter that a new picture was uploaded. It includes picture title link and tags as hashtags
Title: Re: Failed connect to twitter
Post by: pavelk on February 10, 2017, 12:33:41 am
You can setup categories in the gallery when a picture is uploaded it autotweets to your twitter that a new picture was uploaded. It includes picture title link and tags as hashtags
thank you!