0 Favourites

How do I display text from recent tweet or text from url?

  • Without being too intrusive, I thought it would be neat to post updates for my project on twitter or as plain text on a website and then have that display in the app on a specific update page.

    How would I do that?

    I'd like the user to be able to move to that page and then click a button to receive the most recent update and that would make the app set the text field to the most recent tweet or maybe just the text on the specific webpage set up for the task.. whatever is easier, and I imagine it might be easier to pull from plain text on a specific webpage.

    Thank you!

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • I've been digging and I think I might need to look in to the AJAX plugin, but I'm still lost on how to set the text field to the content of a webpage even if the AJAX plugin can call it. -_-

  • Nobody?

  • After requesting a website, you can use the trigger condition Ajax On Completed to set text to Ajax.LastData, which contains the results of your AJAX request.

    But keep in mind it may not work cross-domain:

    [quote:13vemz2h]By default, browsers block AJAX requests across domains. This means, for example, a game on scirra.com can request other pages on scirra.com, but cannot request pages on facebook.com. This is an important security feature of web browsers (it is not specific to Construct 2 or its AJAX object).

    If you're posting on your own site where your project is located, no problem.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[Plugin] tag text
188 25,443
RBuster's avatar
RBuster
Unread hot topic
99 10,137
karshinkoff's avatar
karshinkoff
Unread hot topic
118 32,901
rexrainbow's avatar
rexrainbow