dynamic twitter widget id - twitter

I want to use the new twitter embedded timelines (https://dev.twitter.com/docs/embedded-timelines) but how can I get the data for the right user by username? I have a lot of websites with users (>500) who have their username in the database but as far as I can see you have to give a data-widget-id to get the tweets from the right user.
Is there any way to do this by username? And if not, how can I quickly convert all my users' data-widget-id to the database?
Any help is appreciated

Looks like the best you can do is get a single valid data-widget-id and use it for many different user names using the data-screen-name property.
There is a discussion here from one of the twitter devs. The same one as #alex_b posted in the comments.

You can wrote same script for PHP, for Rails community this gits could be helpfull to get widget-id dynamically.
https://gist.github.com/shah743/dd042df63a8f307f16ed

Related

Return Users ordered by followers Instagram API

I have an issue, I want to get the biggest accounts in Instagram using the API for ruby. When I said "biggest", I meant the accounts ordered by the amount of followers.
I found the service /search, but I don't know how to make the query. It seems that it's only to search by username.
Any idea or workaround?
Thanks!
As far as Instragrams documentation goes this is not possible: https://www.instagram.com/developer/endpoints/users/#get_users_search
From what I can see you can only search by username and I don't see any other way to add parameters. So unless there is an unknown hidden param I don't think this is possible.
If you have a specific user you can see how many users follow that user here: https://www.instagram.com/developer/endpoints/relationships/#get_users_follows but you would need an access token for that user.

Facebook like user search as you type

I am creating a messaging system for my web app and need help with searching for users to send messages to. So far I have it so that if you type a persons name (who is on the site) you can send a message to them. I want it to be as you start typing a persons name, a drop down appears with users names that the current user is following. Any thoughts on how I can do this?
I am using the gem mailboxer also wondering if anyone has suggestions for a better messaging gem. Thanks in advance.
Use jQuery autocomplete, and just populate the dropdown contents as all users that the user is following... something like current_user.followed_users. It's impossible to give code without seeing how your code works though.
A good alternative to jquery autocomplete is http://loopj.com/jquery-tokeninput/ and github at: https://github.com/loopj/jquery-tokeninput. A facebook like tagging to send message to multiple users. A demo app on https://github.com/railscasts/258-token-fields-revised/tree/master/bookstore-tokeninput-after from Ryan Bates from Railscasts http://railscasts.com/episodes/258-token-fields-revised
Good luck.

How to get the follow suggestions from twitter?

On Twitter there is a page that lists some users that are suggested "Twitter accounts suggested for you based on who you follow and more." from this link: https://twitter.com/i/#!/who_to_follow/suggestions
I didn't find an API to retrieve the same list (maybe I am missing it?).
Does anybody knows how that list can be accessed? (other than parsing the html)
The good thing about that list, is that it is not categorized and it does contain common people (ie. not sport/cinema superstars etc.)
I think this can be achieved in two steps by twitter API. Seems like first you need to get the categories that twitter suggested to user, then from those categories you can get the suggested users to the authenticated user.
https://dev.twitter.com/docs/api/1.1/get/users/suggestions
https://dev.twitter.com/docs/api/1.1/get/users/suggestions/%3Aslug

Display a list of twitter accounts with twitter controls/info

I have some lists of twitter accounts that I would like to recommend on my website (e.g. follow these great crafting bloggers). If I have the twitter ID for each of these people, is it possible to create a list of items that show their twitter info (pic, number of tweets/followers, etc.) as well as controls that allow the user to follow each (or multiple) twitter account? I'd like to be able to do it dynamically based on the list of accounts so that I can update the list and not have to redesign the page. I feel like I've seen this around the web before, but I don't see any widgets for doing it and I'm wondering how it's done.
(I would like to use javascript/jquery, but am pretty flexible here)
Thanks!
Jeff
I would first look at the Twitter API. You will find more information on how Twitter works, and you may find information applicable to what you want to accomplish on your website. It's a start, and there's no better place to start than the source itself.

How to automatically post a tweet on twitter

I am working on a site where users can submit data. Is it possible to set up an automated system such that a tweet goes out every time a new data set is received?
I believe it's possible through their own API: http://apiwiki.twitter.com/w/page/22554648/FrontPage
A good place to start is the Twitter API.
Using Abraham's Oauth library in your application and once you have verified/cleaned user import use the variables in an if statement and then call the library and post a tweet. i have a similar set up for adding films i've seen into a database and it tweets a rating everytime.
I can provide coding example (PHP) later if you need further help.

Resources