<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Ah yes… was a bit confused. Forget about twerl and just poll the other Twitter APIs.<div class=""><br class=""></div><div class="">We use oauth for the authentication and calls.</div><div class=""><br class=""></div><div class="">Here are the controllers that do the “OAuth dance”:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://github.com/zotonic/zotonic/tree/master/apps/zotonic_mod_twitter/src/controllers" class="">https://github.com/zotonic/zotonic/tree/master/apps/zotonic_mod_twitter/src/controllers</a></div><div class=""><br class=""></div><div class="">We use this oauth library (copied from rebar.config):</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>{oauth, ".*", {git, "<a href="https://github.com/tim/erlang-oauth.git" class="">https://github.com/tim/erlang-oauth.git</a>", {tag, "v1.6.0"}}}</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">- Marc</div><div class=""><br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 16 Oct 2018, at 10:27, Peter Andersson <<a href="mailto:pekadan@gmail.com" class="">pekadan@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Marc,</div><div class=""><br class=""></div><div class="">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 class=""></div><div class=""><br class=""></div><div class=""> Peter</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Oct 16, 2018 at 8:32 AM Marc Worrell <<a href="mailto:marcw@pobox.com" target="_blank" class="">marcw@pobox.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class="">In Zotonic we are using a twerl fork.<div class=""><br class=""></div><div class=""><span style="background-color:rgba(255,255,255,0)" class=""><a href="https://github.com/mworrell/twerl.git" target="_blank" class="">https://github.com/mworrell/twerl.git</a></span></div><div class=""><br class=""></div><div class="">This works well, am on the road so can’t readily checked what we changed.</div><div class=""><br class=""></div><div class="">- Marc</div><div class=""><br class=""><br class=""><div id="m_-439703805892462966m_-9026196564059646239AppleMailSignature" dir="ltr" class="">Sent from my iPhone</div><div dir="ltr" class=""><br class="">On 16 Oct 2018, at 07:25, Ivan Uemlianin <<a href="mailto:ivan@llaisdy.com" target="_blank" class="">ivan@llaisdy.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div dir="ltr" class=""><div class="">Dear Peter</div><div class=""><br class=""></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 class=""><br class=""></div><div class="">It began as a fork of twerl:</div><div class=""><br class=""></div><div class=""> <a href="https://github.com/lucaspiller/twerl" target="_blank" class="">https://github.com/lucaspiller/twerl</a></div><div class=""><br class=""></div><div class="">Best wishes</div><div class=""><br class=""></div><div class="">Ivan</div><div class=""><br class=""><br class=""><div id="m_-439703805892462966m_-9026196564059646239AppleMailSignature" class="">--<br class="">festina lente<div class=""><br class=""></div></div><div class=""><br class="">On 16 Oct 2018, at 00:34, Peter Andersson <<a href="mailto:pekadan@gmail.com" target="_blank" class="">pekadan@gmail.com</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">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" class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Thanks,</div><div class="">Peter</div></div></div>
</div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">erlang-questions mailing list</span><br class=""><span class=""><a href="mailto:erlang-questions@erlang.org" target="_blank" class="">erlang-questions@erlang.org</a></span><br class=""><span class=""><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank" class="">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br class=""></div></blockquote></div></div></blockquote><blockquote type="cite" class=""><div dir="ltr" class=""><span class="">_______________________________________________</span><br class=""><span class="">erlang-questions mailing list</span><br class=""><span class=""><a href="mailto:erlang-questions@erlang.org" target="_blank" class="">erlang-questions@erlang.org</a></span><br class=""><span class=""><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank" class="">http://erlang.org/mailman/listinfo/erlang-questions</a></span><br class=""></div></blockquote></div></div></blockquote></div></div>
_______________________________________________<br class="">erlang-questions mailing list<br class=""><a href="mailto:erlang-questions@erlang.org" class="">erlang-questions@erlang.org</a><br class="">http://erlang.org/mailman/listinfo/erlang-questions<br class=""></div></blockquote></div><br class=""></div></div></body></html>