Social Reach and Twitter

Vote:
 

Hi,

I've just installed Social Reach, but I'm having problems setting up a Twitter channel.

Facebook and LinkedIn work fine, but Twitter will not authorise and I get the following error:

DotNetOpenAuth.Messaging.ProtocolException: Error occurred while sending a direct message or getting the response. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.

Does anyone know what the issue could be? Maybe something to do with Twitter's depreciation of the v1 API?

Thanks,
Robert
#71066
May 08, 2013 11:53
Vote:
 

Yup, broken because old Twitter API is deprecated. See https://twitter.com/kloojed/statuses/292621633229836288

#71068
May 08, 2013 12:25
Vote:
 

Ah, I thought so!

Do you happen to know if this patch was ever released?

Robert

#71069
May 08, 2013 12:30
Vote:
 

No, sorry. I see you contacted @episerver on Twitter, you could also try @kloojed who seems to know how to fix it. 

Please update this thread with the solution if you find it :-)

#71071
May 08, 2013 12:39
Vote:
 

Will do, thanks for your help.

Robert

#71072
May 08, 2013 12:51
Vote:
 

I solved it by modifying the static field containing the endpoint at application start up.

            var field = typeof(EPiServer.Social.Providers.Twitter.TwitterClient).GetField("UpdateStatusEndpoint",
                     BindingFlags.Static |
                     BindingFlags.NonPublic);

            // Normally the first argument to "SetValue" is the instance
            // of the type but since we are mutating a static field we pass "null"
            field.SetValue(null, new MessageReceivingEndpoint("https://api.twitter.com/1.1/statuses/update.json", HttpDeliveryMethods.PostRequest));

Marcus

#71151
May 11, 2013 12:32
Vote:
 

Thanks Marcus.

Unfortunately I can't even set up the Twitter channel as it won't authenticate.

How did you get around this?

Robert

#71169
May 13, 2013 11:10
Vote:
 

I'm not sure what you mean, can you add the twitter channel but when you try to authenticate it fails?

#71215
May 14, 2013 13:10
Vote:
 

I can't actually add a Twitter channel, an error is thrown when I click the "Edit Account" link.

Robert

#71216
May 14, 2013 13:25
Vote:
 

Ok, what does the error message say? I had one issue with Newtonsoft.json, I used the wrong assembly version which caused a error for me.

#71217
May 14, 2013 13:32
Vote:
 

The error is:

 

DotNetOpenAuth.Messaging.ProtocolException: Error occurred while sending a direct message or getting the response. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
#71218
May 14, 2013 13:33
Vote:
 

Hm sorry, I out of ideas ... maybe you could check the dotnetopenauth settings in web.config, I think the whitelistHosts setting is important if you are running your site locally.

#71220
May 14, 2013 13:41
Vote:
 

Hi,

We have now updated social reach for cms 6 r2 to support the new twitter api + a few more things. You can download it here: http://world.episerver.com/Download/Items/EPiServer-Social-Reach/EPiServer-Social-Reach-1-Beta/

There is also a new "latest downloads" box on the downloads page where you can track everything we release.

#71336
May 16, 2013 8:39
Vote:
 

Hi Peter,

That's brilliant news, thank you.

The download link doesn't seem to work though, I get a Page Not Found error when I try to download.

Robert

#71346
May 16, 2013 10:21
Vote:
 

Hi, sorry for the inconvinience that the download did not work. But it is fixed now.

#71360
May 16, 2013 12:43
Vote:
 

Thank you Helen and Peter.

I have downloaded and installed this update and it seems to have fixed the issue I was having.

Regards,

Robert

#71458
May 20, 2013 10:55
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.