Skip to main content
Participant
May 16, 2013
Question

How do I add Twitter Feed To Air App

  • May 16, 2013
  • 1 reply
  • 759 views

Hi there

I'm building a desktop app using Flash CS5.5 and wanting to add my Twitter Timeline feed to the frontpage.

Here is the code I wantr to add.

<a class="twitter-timeline"  href="https://twitter.com/inlovegraphic"  data-widget-id="335002200235454465">Tweets by @inlovegraphic</a>

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

How do I go about adding it in Flash cs5.5?

Regards

Mark

This topic has been closed for replies.

1 reply

May 16, 2013

If showing the timeline does not require any permissions, you could just open a stageWebView/HTMLLoader and run the jScript.

I had to post stuff, so i had to get permissions first.

I tried to use the Tweetr-API (com.swfjunkie.tweetr).

http://wiki.swfjunkie.com/tweetr:source

It wasnt updated for 2 years, if you try it, you have to update some Twitter-API-urs/paths, trial and error.

You dont have to use it, but its a good example/workflow how oAuth and pinless authentification is done in AIR/Stagewebview.

Basically there are 2 ways.

1) HTLLoader , Desktop

2) StageWebview for mobile or external interface (Jscript).

You can see an examples/workflow in the OAuth-class.

com.swfjunkie.tweetr.oauth

Before you start you have to create a twitter account an receive a key and a secret for your app.

So twitter can identify your App and users can grant  specific permissions to your app.

Once the user granted your app permission, you can send tweets until twitter or the user revokes your permissions (=forever).

Tut:

http://blog.swfjunkie.com/2010/08/tweetr-tutorials-pinless-oauth-in-air/

V.

PS: I couldnt figure out how to logout and delete the system-browser (used by air) cookies, seems to be a bug in the API (not just AIR).