Twitter Account Activity API (webhooks) problems

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Twitter Account Activity API (webhooks) problems

Peter Andersson-8
Hi,

I'm working on an Erlang app interfacing Twitter using the Account Activity API and I can't get the app and default user to pass authentication. I started out using the erlang-oauth lib on github (https://github.com/tim/erlang-oauth) to generate a valid oauth 1.0 signature, but then Twitter authentication failed and I did my own oauth signing function. My function produced the exact same result as erlang-oauth though (go figure!), so the signature itself is probably not an issue. Maybe I'm not getting the parameters right, or the actual request.

Anyone on the list been interfacing Twitter from an Erlang program using webhooks? If so, would you mind sharing some knowledge? I would really appreciate seeing an example of a working webhook URL registration (POST to the account_activity endpoint in user context).

Thanks,
Peter

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Account Activity API (webhooks) problems

Lloyd R. Prentice-2
I’d be much interested in this as well.

Best,

LRP



Sent from my iPad

On Oct 15, 2018, at 7:34 PM, Peter Andersson <[hidden email]> wrote:

Hi,

I'm working on an Erlang app interfacing Twitter using the Account Activity API and I can't get the app and default user to pass authentication. I started out using the erlang-oauth lib on github (https://github.com/tim/erlang-oauth) to generate a valid oauth 1.0 signature, but then Twitter authentication failed and I did my own oauth signing function. My function produced the exact same result as erlang-oauth though (go figure!), so the signature itself is probably not an issue. Maybe I'm not getting the parameters right, or the actual request.

Anyone on the list been interfacing Twitter from an Erlang program using webhooks? If so, would you mind sharing some knowledge? I would really appreciate seeing an example of a working webhook URL registration (POST to the account_activity endpoint in user context).

Thanks,
Peter
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Account Activity API (webhooks) problems

Ivan Uemlianin
In reply to this post by Peter Andersson-8
Dear Peter

I have an old erlang twitter client (using oauth) that used to work. When I get to the office I’ll see if it still works (twitter change their api regularly) & if so might be able to help.

It began as a fork of twerl:


Best wishes

Ivan


--
festina lente


On 16 Oct 2018, at 00:34, Peter Andersson <[hidden email]> wrote:

Hi,

I'm working on an Erlang app interfacing Twitter using the Account Activity API and I can't get the app and default user to pass authentication. I started out using the erlang-oauth lib on github (https://github.com/tim/erlang-oauth) to generate a valid oauth 1.0 signature, but then Twitter authentication failed and I did my own oauth signing function. My function produced the exact same result as erlang-oauth though (go figure!), so the signature itself is probably not an issue. Maybe I'm not getting the parameters right, or the actual request.

Anyone on the list been interfacing Twitter from an Erlang program using webhooks? If so, would you mind sharing some knowledge? I would really appreciate seeing an example of a working webhook URL registration (POST to the account_activity endpoint in user context).

Thanks,
Peter
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Account Activity API (webhooks) problems

Peter Andersson-8
Excellent! Thanks a lot for the pointers guys! I'll go check it out!

As far as I understand, Twitter changed the activity API from a streaming interface to webhooks earlier this year. Don't know if/how the method for authentication changed at the same time, but webhook registration must be new requirement.

Peter

On Tue, Oct 16, 2018 at 8:32 AM Marc Worrell <[hidden email]> wrote:
In Zotonic we are using a twerl fork.


This works well, am on the road so can’t readily checked what we changed.

- Marc


Sent from my iPhone

On 16 Oct 2018, at 07:25, Ivan Uemlianin <[hidden email]> wrote:

Dear Peter

I have an old erlang twitter client (using oauth) that used to work. When I get to the office I’ll see if it still works (twitter change their api regularly) & if so might be able to help.

It began as a fork of twerl:


Best wishes

Ivan


--
festina lente


On 16 Oct 2018, at 00:34, Peter Andersson <[hidden email]> wrote:

Hi,

I'm working on an Erlang app interfacing Twitter using the Account Activity API and I can't get the app and default user to pass authentication. I started out using the erlang-oauth lib on github (https://github.com/tim/erlang-oauth) to generate a valid oauth 1.0 signature, but then Twitter authentication failed and I did my own oauth signing function. My function produced the exact same result as erlang-oauth though (go figure!), so the signature itself is probably not an issue. Maybe I'm not getting the parameters right, or the actual request.

Anyone on the list been interfacing Twitter from an Erlang program using webhooks? If so, would you mind sharing some knowledge? I would really appreciate seeing an example of a working webhook URL registration (POST to the account_activity endpoint in user context).

Thanks,
Peter
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Account Activity API (webhooks) problems

Peter Andersson-8
In reply to this post by Ivan Uemlianin
Marc,

Does your twerl fork actually still work?? If I'm not missing something, it's based on the streaming API that Twitter shut down in August. Is Zotonic using a different twerl fork, or a different Twitter client app altogether?

  Peter

On Tue, Oct 16, 2018 at 8:32 AM Marc Worrell <[hidden email]> wrote:
In Zotonic we are using a twerl fork.


This works well, am on the road so can’t readily checked what we changed.

- Marc


Sent from my iPhone

On 16 Oct 2018, at 07:25, Ivan Uemlianin <[hidden email]> wrote:

Dear Peter

I have an old erlang twitter client (using oauth) that used to work. When I get to the office I’ll see if it still works (twitter change their api regularly) & if so might be able to help.

It began as a fork of twerl:


Best wishes

Ivan


--
festina lente


On 16 Oct 2018, at 00:34, Peter Andersson <[hidden email]> wrote:

Hi,

I'm working on an Erlang app interfacing Twitter using the Account Activity API and I can't get the app and default user to pass authentication. I started out using the erlang-oauth lib on github (https://github.com/tim/erlang-oauth) to generate a valid oauth 1.0 signature, but then Twitter authentication failed and I did my own oauth signing function. My function produced the exact same result as erlang-oauth though (go figure!), so the signature itself is probably not an issue. Maybe I'm not getting the parameters right, or the actual request.

Anyone on the list been interfacing Twitter from an Erlang program using webhooks? If so, would you mind sharing some knowledge? I would really appreciate seeing an example of a working webhook URL registration (POST to the account_activity endpoint in user context).

Thanks,
Peter
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Account Activity API (webhooks) problems

Marc Worrell
In reply to this post by Peter Andersson-8
Yes, the streaming interface have been removed.

You can use a free version of the webhooks which should allow you to “follow” one account.

For one of my customers I changed the ingest of tweets to periodic polling of a list of accounts.
Which works quite well, if you keep track of the newest tweet id and request changes since that tweet.

Still have to do that for the Twitter integration in Zotonic as well… the ingest is broken there since the Twitter API changes.

BTW, requesting developer access to the new webhooks can take a while, multiple weeks, so do that soon.

- Marc


On 16 Oct 2018, at 09:50, Peter Andersson <[hidden email]> wrote:

Excellent! Thanks a lot for the pointers guys! I'll go check it out!

As far as I understand, Twitter changed the activity API from a streaming interface to webhooks earlier this year. Don't know if/how the method for authentication changed at the same time, but webhook registration must be new requirement.

Peter

On Tue, Oct 16, 2018 at 8:32 AM Marc Worrell <[hidden email]> wrote:
In Zotonic we are using a twerl fork.


This works well, am on the road so can’t readily checked what we changed.

- Marc


Sent from my iPhone

On 16 Oct 2018, at 07:25, Ivan Uemlianin <[hidden email]> wrote:

Dear Peter

I have an old erlang twitter client (using oauth) that used to work. When I get to the office I’ll see if it still works (twitter change their api regularly) & if so might be able to help.

It began as a fork of twerl:


Best wishes

Ivan


--
festina lente


On 16 Oct 2018, at 00:34, Peter Andersson <[hidden email]> wrote:

Hi,

I'm working on an Erlang app interfacing Twitter using the Account Activity API and I can't get the app and default user to pass authentication. I started out using the erlang-oauth lib on github (https://github.com/tim/erlang-oauth) to generate a valid oauth 1.0 signature, but then Twitter authentication failed and I did my own oauth signing function. My function produced the exact same result as erlang-oauth though (go figure!), so the signature itself is probably not an issue. Maybe I'm not getting the parameters right, or the actual request.

Anyone on the list been interfacing Twitter from an Erlang program using webhooks? If so, would you mind sharing some knowledge? I would really appreciate seeing an example of a working webhook URL registration (POST to the account_activity endpoint in user context).

Thanks,
Peter
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Account Activity API (webhooks) problems

Marc Worrell
In reply to this post by Peter Andersson-8
Ah yes… was a bit confused.  Forget about twerl and just poll the other Twitter APIs.

We use oauth for the authentication and calls.

Here are the controllers that do the “OAuth dance”:


We use this oauth library (copied from rebar.config):

{oauth, ".*", {git, "https://github.com/tim/erlang-oauth.git", {tag, "v1.6.0"}}}


- Marc


On 16 Oct 2018, at 10:27, Peter Andersson <[hidden email]> wrote:

Marc,

Does your twerl fork actually still work?? If I'm not missing something, it's based on the streaming API that Twitter shut down in August. Is Zotonic using a different twerl fork, or a different Twitter client app altogether?

  Peter

On Tue, Oct 16, 2018 at 8:32 AM Marc Worrell <[hidden email]> wrote:
In Zotonic we are using a twerl fork.


This works well, am on the road so can’t readily checked what we changed.

- Marc


Sent from my iPhone

On 16 Oct 2018, at 07:25, Ivan Uemlianin <[hidden email]> wrote:

Dear Peter

I have an old erlang twitter client (using oauth) that used to work. When I get to the office I’ll see if it still works (twitter change their api regularly) & if so might be able to help.

It began as a fork of twerl:


Best wishes

Ivan


--
festina lente


On 16 Oct 2018, at 00:34, Peter Andersson <[hidden email]> wrote:

Hi,

I'm working on an Erlang app interfacing Twitter using the Account Activity API and I can't get the app and default user to pass authentication. I started out using the erlang-oauth lib on github (https://github.com/tim/erlang-oauth) to generate a valid oauth 1.0 signature, but then Twitter authentication failed and I did my own oauth signing function. My function produced the exact same result as erlang-oauth though (go figure!), so the signature itself is probably not an issue. Maybe I'm not getting the parameters right, or the actual request.

Anyone on the list been interfacing Twitter from an Erlang program using webhooks? If so, would you mind sharing some knowledge? I would really appreciate seeing an example of a working webhook URL registration (POST to the account_activity endpoint in user context).

Thanks,
Peter
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Account Activity API (webhooks) problems

Peter Andersson-8
Thanks a lot Marc for the help and pointers, much appreciated!

I'll take a look at your oauth code. Maybe it can give me some new ideas.

A polling solution could maybe be a workaround for me, at least until I manage to get that webhook up and running.

  Peter

On Tue, Oct 16, 2018 at 10:34 AM Marc Worrell <[hidden email]> wrote:
Ah yes… was a bit confused.  Forget about twerl and just poll the other Twitter APIs.

We use oauth for the authentication and calls.

Here are the controllers that do the “OAuth dance”:


We use this oauth library (copied from rebar.config):

{oauth, ".*", {git, "https://github.com/tim/erlang-oauth.git", {tag, "v1.6.0"}}}


- Marc


On 16 Oct 2018, at 10:27, Peter Andersson <[hidden email]> wrote:

Marc,

Does your twerl fork actually still work?? If I'm not missing something, it's based on the streaming API that Twitter shut down in August. Is Zotonic using a different twerl fork, or a different Twitter client app altogether?

  Peter

On Tue, Oct 16, 2018 at 8:32 AM Marc Worrell <[hidden email]> wrote:
In Zotonic we are using a twerl fork.


This works well, am on the road so can’t readily checked what we changed.

- Marc


Sent from my iPhone

On 16 Oct 2018, at 07:25, Ivan Uemlianin <[hidden email]> wrote:

Dear Peter

I have an old erlang twitter client (using oauth) that used to work. When I get to the office I’ll see if it still works (twitter change their api regularly) & if so might be able to help.

It began as a fork of twerl:


Best wishes

Ivan


--
festina lente


On 16 Oct 2018, at 00:34, Peter Andersson <[hidden email]> wrote:

Hi,

I'm working on an Erlang app interfacing Twitter using the Account Activity API and I can't get the app and default user to pass authentication. I started out using the erlang-oauth lib on github (https://github.com/tim/erlang-oauth) to generate a valid oauth 1.0 signature, but then Twitter authentication failed and I did my own oauth signing function. My function produced the exact same result as erlang-oauth though (go figure!), so the signature itself is probably not an issue. Maybe I'm not getting the parameters right, or the actual request.

Anyone on the list been interfacing Twitter from an Erlang program using webhooks? If so, would you mind sharing some knowledge? I would really appreciate seeing an example of a working webhook URL registration (POST to the account_activity endpoint in user context).

Thanks,
Peter
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Twitter Account Activity API (webhooks) problems

Peter Andersson-8
Hi Marc,

Just wanted to let you know that I got my problem solved thanks to you. I used erlang-oauth to generate the signature, but not to create the POST request to Twitter. It looked to me like the form of the erlang-oauth request did not match the Twitter API spec. However, reading the Zotonic twitter client code I noticed that it uses oauth:post/5, so I checked the form of this POST request again, compared it to my own, and realized I had made mistakes (I must have misunderstood the Twitter API docs).

Thanks again for helping! I truly appreciate it!

  Peter

On Tue, Oct 16, 2018 at 2:59 PM Peter Andersson <[hidden email]> wrote:
Thanks a lot Marc for the help and pointers, much appreciated!

I'll take a look at your oauth code. Maybe it can give me some new ideas.

A polling solution could maybe be a workaround for me, at least until I manage to get that webhook up and running.

  Peter

On Tue, Oct 16, 2018 at 10:34 AM Marc Worrell <[hidden email]> wrote:
Ah yes… was a bit confused.  Forget about twerl and just poll the other Twitter APIs.

We use oauth for the authentication and calls.

Here are the controllers that do the “OAuth dance”:


We use this oauth library (copied from rebar.config):

{oauth, ".*", {git, "https://github.com/tim/erlang-oauth.git", {tag, "v1.6.0"}}}


- Marc


On 16 Oct 2018, at 10:27, Peter Andersson <[hidden email]> wrote:

Marc,

Does your twerl fork actually still work?? If I'm not missing something, it's based on the streaming API that Twitter shut down in August. Is Zotonic using a different twerl fork, or a different Twitter client app altogether?

  Peter

On Tue, Oct 16, 2018 at 8:32 AM Marc Worrell <[hidden email]> wrote:
In Zotonic we are using a twerl fork.


This works well, am on the road so can’t readily checked what we changed.

- Marc


Sent from my iPhone

On 16 Oct 2018, at 07:25, Ivan Uemlianin <[hidden email]> wrote:

Dear Peter

I have an old erlang twitter client (using oauth) that used to work. When I get to the office I’ll see if it still works (twitter change their api regularly) & if so might be able to help.

It began as a fork of twerl:


Best wishes

Ivan


--
festina lente


On 16 Oct 2018, at 00:34, Peter Andersson <[hidden email]> wrote:

Hi,

I'm working on an Erlang app interfacing Twitter using the Account Activity API and I can't get the app and default user to pass authentication. I started out using the erlang-oauth lib on github (https://github.com/tim/erlang-oauth) to generate a valid oauth 1.0 signature, but then Twitter authentication failed and I did my own oauth signing function. My function produced the exact same result as erlang-oauth though (go figure!), so the signature itself is probably not an issue. Maybe I'm not getting the parameters right, or the actual request.

Anyone on the list been interfacing Twitter from an Erlang program using webhooks? If so, would you mind sharing some knowledge? I would really appreciate seeing an example of a working webhook URL registration (POST to the account_activity endpoint in user context).

Thanks,
Peter
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions