I'd like to integrate Twitter into my app but keep the tweets specific to the app topic. For example, if the app is about recipes, all tweets on the built in Twitter client will be about recipes. Basically acting like a chat client about recipes.
However, I don't think Twitter works that way. You basically follow someone (say the app's Twitter name) and see tweets from the app's Twitter name. In this case, customers will follow the recipe app and can see its tweets. But I'd also like tweets from any followers to display in the Twitter client but only if they are relevant to the recipe app. In other words, I don't want anything a follower might tweet to appear. Meaning, they need to tweet under the recipe app for the tweet to appear. Maybe I'm confused about how Twitter works and this sort of focused tweeting won't be an issue. Can any one explain if this is possible?
Put a Hash Tag in the users tweets, such as #recipeappname. Then display tweets that only contain that Hash Tag.
Related
I have a twitter share button on a webpage. I have submitted my website for twitter cards, and it is approved. I am using the twitter card tags correctly, but I have troubles to get the images appear on the time-line. On the twitter timeline I only see text and the URL. Only when clicking on the tweet, an image appears below (the tweet expands).
I would like to have this image appear on the timeline, without needing to expand the tweet. Is this possible, or am is it necessary to use a service like twitpic or flickr to make this happen?
My first thought is that this is not possible because twitter only accepts certain image websites to publish their images on the twitter timeline, but I cannot find a twitter dev source that confirms this.
This is the normal behaviour for the twitter card.
Please read https://dev.twitter.com/cards/troubleshooting#timeline
The second point of the troubleshooting might be the solution you're looking for: "For photos and animated GIFs, upload the media directly with the Tweet or consider using the Twitter API to upload media." You can also explore the other solutions offered.
UPDATE: It looks like the solution I was proposing refers to sharing content directly from twitter, so it's not an option. See this twitter community thread
I'm creating Rails app as a guide to restaurants whereby information is displayed regarding each restaurant, menus etc. It is a supporting website to an iOS app.
I would like to do allow the user to book or send an email to book a table on a restaurant. I'm storing both user and restaurant e-mails in my app.
I could easily do this in the iOS app using the Mail app but I'd like to offer the same functionality within my Rails version also. Is this possible?
Thanks.
As #CarlZulauf commented, you are looking for Rails e-mail interface. It is hard to help you here because you didn't explain to us what did you tried and what is not working. If you have problems, you might want to create a new question, or edit this one, including the info, otherwise it is impossible for any one to help you more than just give you the doc link.
My app, in one of its parts, should reproduce the same behaviour as a web page, where you can find a section with a table of Twitter posts, I guess they are a user's timeline. I took a look at Twitter api's and I found a call which could return it, but, If I got it right, you are supposed to be authenticated with that user credentials. Is there a way to achieve it without being that user (thus without using that user's credentials)? If not we have to assume that web plugins have more flexibility than queries which return xml, or json? Which kind of approach fits best, considering the app needs to support iOS from 4.3 to 6.x? Does Twitter+Oauth provide more flexibility than direct Twitter api calls?
Hm, if you are looking to just display user's feed you can do it as simple as:
https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=reMakeIn&count=200
Where you change the screen_name to the desired user that you want to show the feeds for.
No need what so ever to use authentication for this.
Not sure if this is what you want to achieve, but I use this approach to show random user's tweet feed.
I am using the Twitter Streaming API since I need to get all posts on the home timeline as well as lists and hashtags the user is following. However, this also returns mentions (which do not appear on the timeline) is there a way to exclude these from the streaming API?
It turns out that it is not yet possible to ignore #mentions in the Twitter Stream, so I just had to manually sort and remove #mentions after receiving the data.
I'm using the twitter gem to build a Twitter bot in Ruby. I am trying to make it self-sustainable as it were, so I want it to generate its own content to tweet by scraping tweets of users outside its social circle (and then perhaps garbling them with Markov chain generator).
Which one is a better strategy?
Search for tweets via api
Load Twitter pages and scrape tweets with Hpricot or Nokogiri
Also, how can I try to ensure the base tweets come from outside my bot's followers' friends so it's harder to tell it's a bot?
At the moment I use a .yml file with tweets I generated by hand, which is far from ideal.
There's two questions here.
It's always better to use an API where one is available. This will future-proof you against the bot randomly breaking if a simple html element is changed, and it will also allow the website (ie, twitter) to rate limit your searches in case you put too high a load on the service. Although this is unlikely for twitter, it's good practice.
Sometimes, the information you want is unobtainable via the API. In this case, you should consider if you really need to scrape it, and if so, how to limit yourself to be polite.
Basically, if the API allows you to do what you want, use it for maintainability.
As for your second question, I do not have any experience with the twitter API. Is there a method to get twitter IDs of all your followers, and who they follow? If not, you'll be forced to scrape as earlier mentioned - if you really do need this information.
Once you have a list of those who your followers follow, you can check if the ID of the poster of what you want to repost falls inside this set.
Would you consider retweeting for this aspect of the bot?
One thing to also note is performance. If you were to scrape the website, you would have to download the entire page, then scrape the page(which is processor intensive as it is). As opposed to hitting the API, which would only return JSON/XML data.
So from strictly a performance standpoint, I would go with the API.