We already use Twitter API v1.1.
https://github.com/rodrigoprimo/social-connect/blob/28236cb18fecc45aec1f2fc1fbe32b4b054306d7/twitter/twitteroauth/twitteroauth.php#L21
Maybe this error message is coming from another plugin you have enabled in your site?
If I’m mistaken please tell me where this “Show imagem in new tab” link is located. I couldn’t find it.
Thanks!
Same here. The Link to the profile image shows:
“The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.”
@Cheatsrichter are you using the latest version of Social Connect? Is there a link where I can see this error? We are already using Twitter API v1.1 but maybe there is some placing I’m failing to find still using the old version of the API.
Yep. This is the link to the twitter profile picture that the user gets after register with twitter.
https://api.twitter.com/1/users/profile_image?id=2406724063&size=normal
In line 350 of the file social-connect.php, if you replace:
$custom_avatar = "http://api.twitter.com/1/users/profile_image?id=$social_id&size=$size_label";
With:
$custom_avatar = "http://api.twitter.com/1.1/users/profile_image?id=$social_id&size=$size_label";
The problem is fixed?
Nope. It looks like you can’t get the profile picture with a simple combination of url and a user id. It’s generated with the use of access tokens.
Bad Authentication data:
https://api.twitter.com/1.1/users/profile_image?id=2406724063&size=bigger
This is what I need.
https://pbs.twimg.com/profile_images/447829695199866880/9R_WcZCz_normal.png
There are some tutorials for this but I don’t know how to merge them with your plugin. Maybe you know (For example http://codedsack.com/get-user-profile-image-twitter-api-v1-1/).
There is one line for the user picture I think for the callback.php. But I don’t know how to call it from the sc_filter_avatar function.
$img = $user -> profile_image_url_https;
I hope this helps a bit.
Now I understand what is the problem thanks to the link you sent (which has moved to http://codedsack.com/twitter/how-to-get-the-user-profile-image-from-twitter-using-api-v1-1/).
I’ve created an issue on GitHub https://github.com/rodrigoprimo/social-connect/issues/50
I hope to be able to fix it in the next weeks. In the mean time pull requests are welcome in case anyone find a solution.