<div dir="ltr"><div>Thanks a lot Marc for the help and pointers, much appreciated!</div><div><br></div><div>I'll take a look at your oauth code. Maybe it can give me some new ideas.</div><div><br></div><div>A polling solution could maybe be a workaround for me, at least until I manage to get that webhook up and running.<br></div><div><br></div><div>  Peter<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 10:34 AM Marc Worrell <<a href="mailto:marc@worrell.nl">marc@worrell.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Ah yes… was a bit confused.  Forget about twerl and just poll the other Twitter APIs.<div><br></div><div>We use oauth for the authentication and calls.</div><div><br></div><div>Here are the controllers that do the “OAuth dance”:</div><div><br></div><div><span class="m_1016184614846515575Apple-tab-span" style="white-space:pre-wrap">     </span><a href="https://github.com/zotonic/zotonic/tree/master/apps/zotonic_mod_twitter/src/controllers" target="_blank">https://github.com/zotonic/zotonic/tree/master/apps/zotonic_mod_twitter/src/controllers</a></div><div><br></div><div>We use this oauth library (copied from rebar.config):</div><div><br></div><div><span class="m_1016184614846515575Apple-tab-span" style="white-space:pre-wrap">        </span>{oauth, ".*", {git, "<a href="https://github.com/tim/erlang-oauth.git" target="_blank">https://github.com/tim/erlang-oauth.git</a>", {tag, "v1.6.0"}}}</div><div><br></div><div><br></div><div>- Marc</div><div><br><div><div><br><blockquote type="cite"><div>On 16 Oct 2018, at 10:27, Peter Andersson <<a href="mailto:pekadan@gmail.com" target="_blank">pekadan@gmail.com</a>> wrote:</div><br class="m_1016184614846515575Apple-interchange-newline"><div><div dir="ltr"><div>Marc,</div><div><br></div><div>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?<br></div><div><br></div><div>  Peter</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 8:32 AM Marc Worrell <<a href="mailto:marcw@pobox.com" target="_blank">marcw@pobox.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">In Zotonic we are using a twerl fork.<div><br></div><div><span style="background-color:rgba(255,255,255,0)"><a href="https://github.com/mworrell/twerl.git" target="_blank">https://github.com/mworrell/twerl.git</a></span></div><div><br></div><div>This works well, am on the road so can’t readily checked what we changed.</div><div><br></div><div>- Marc</div><div><br><br><div id="m_1016184614846515575m_-439703805892462966m_-9026196564059646239AppleMailSignature" dir="ltr">Sent from my iPhone</div><div dir="ltr"><br>On 16 Oct 2018, at 07:25, Ivan Uemlianin <<a href="mailto:ivan@llaisdy.com" target="_blank">ivan@llaisdy.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div>Dear Peter</div><div><br></div>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.<div><br></div><div>It began as a fork of twerl:</div><div><br></div><div>    <a href="https://github.com/lucaspiller/twerl" target="_blank">https://github.com/lucaspiller/twerl</a></div><div><br></div><div>Best wishes</div><div><br></div><div>Ivan</div><div><br><br><div id="m_1016184614846515575m_-439703805892462966m_-9026196564059646239AppleMailSignature">--<br>festina lente<div><br></div></div><div><br>On 16 Oct 2018, at 00:34, Peter Andersson <<a href="mailto:pekadan@gmail.com" target="_blank">pekadan@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>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 (<a href="https://github.com/tim/erlang-oauth" target="_blank">https://github.com/tim/erlang-oauth</a>) 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.</div><div><br></div><div>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).</div><div><br></div><div>Thanks,</div><div>Peter</div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a></span><br><span><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></div></blockquote></div></div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>erlang-questions mailing list</span><br><span><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a></span><br><span><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br></div></blockquote></div></div></blockquote></div></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br></div></blockquote></div><br></div></div></div></blockquote></div>