Search Results

Search found 522 results on 21 pages for 'tweet'.

Page 2/21 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Use the Twitter API to run a script every time I post a new tweet

    - by Mathias Bynens
    I have a PHP script on my server that I want to run every time I post a new tweet to Twitter. Is there a way to automate this? I could of course set up a cron job to run the script every five minutes, or run the script manually every time after tweeting, but neither of those is instant — and that’s exactly what I’m looking for. Is it possible to use the Twitter API to run a script / get a URL every time my timeline is updated?

    Read the article

  • Tweet's xml format

    - by Anand Kulkarni
    I get ' top tweets ' from twitter as an RSS feed in xml format . There is a guid field in that xml format. There is a long 11 digit number at the end of guid field , is it unique for every tweet ?

    Read the article

  • twitter like tweet update notification in asp.net

    - by dianuh
    we are adding new functionality in our application where in there would be some users posting short comments and on the other side there would be some users monitoring the activity or comments posted by the other users within the same application. my question is, what is the best way of implementing the notification of new comment availability(similar to tweet update notification)? FYI the application is on .Net 3.5.

    Read the article

  • How do I tweet, using the DotNetOpenAuth library?

    - by MedicineMan
    I just downloaded the DotNetOpenAuth library and ran the AuthConsumer demo. It is an excellent library so far! Everything worked as advertised, which has not been my experience with a lot of Facebook and Twitter sample code that I have been working with recently. What I am trying to figure out is: How do I tweet using this library? I am currently planning to implement this in ASP MVC, but my initial thoughts is that the presentation platform doesn't matter all that much at the level I'm looking at.

    Read the article

  • How to stay DRY when using both Javascript and ERB templates (Rails)

    - by user94154
    I'm building a Rails app that uses Pusher to use web sockets to push updates to directly to the client. In javascript: channel.bind('tweet-create', function(tweet){ //when a tweet is created, execute the following code: $('#timeline').append("<div class='tweet'><div class='tweeter'>"+tweet.username+"</div>"+tweet.status+"</div>"); }); This is nasty mixing of code and presentation. So the natural solution would be to use a javascript template. Perhaps eco or mustache: //store this somewhere convenient, perhaps in the view folder: tweet_view = "<div class='tweet'><div class='tweeter'>{{tweet.username}}</div>{{tweet.status}}</div>" channel.bind('tweet-create', function(tweet){ //when a tweet is created, execute the following code: $('#timeline').append(Mustache.to_html(tweet_view, tweet)); //much cleaner }); This is good and all, except, I'm repeating myself. The mustache template is 99% identical to the ERB templates I already have written to render HTML from the server. The intended output/purpose of the mustache and ERB templates are 100% the same: to turn a tweet object into tweet html. What is the best way to eliminate this repetition? UPDATE: Even though I answered my own question, I really want to see other ideas/solutions from other people--hence the bounty!

    Read the article

  • regular expression to extract @name symbols from tweet

    - by Joey
    Hello All, I would like to use regular expression to extract only @patrick @michelle from the following sentence: @patrick @michelle we having diner @home tonight do you want to join? Note: @home should not be include in the result because, it is not at beginning of the sentence nor is followed by another @name. Any solution, tip, comments will be really appreciated.

    Read the article

  • Windows Forms application C# | Sending Tweet

    - by Andrew Craswell
    I've been able to get my Twitter web app working just fine, but I've recently decided to add Tweeting functionality from a Windows Form, but I'm having no luck sending tweets. No errors are thrown or anything. Mind looking over my code? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using TweetSharp; namespace TwitterAdvirtiser { public partial class Form1 : Form { private string cKey = "xxx"; private string cSecret = "xxx"; private string oToken = "xxx"; private string aToken = "xxx"; public Form1() { InitializeComponent(); OnStart(); } private void OnStart() { //Authenticate with Twitter TwitterService service = new TwitterService(cKey, cSecret); service.AuthenticateWith(oToken, aToken); service.SendTweet("testing"); } } } It seems like I'm authenticating just fine, I can walk through debug mode and see all my details in the TwitterUser structure, and yet my tweets never show up on my feed. Whats up? By the way, I'm using Visual Studios 2010, and .NET 4.0. I have verified that the oToken and aToken strings have my developer tokens.

    Read the article

  • How do I run an array through an IF statement in rails?

    - by codyvbrown
    I am creating an application that highlights user messages from a stream based on whether or not the user has been 'vouched'. It works fine if it's setup for a single author. For example controller: @vouch = Vouch.last.vouched_user_nickname view: <% Twitter::Search.new(params[:id]).each do |tweet| %> <li> <%= image_tag tweet.profile_image_url %> <% if @vouch.include? tweet.from_user %> <div class="flit_message_containerh"> <u> <a href="http://twitter.com/<%= tweet.from_user %>"> <%= tweet.from_user %></a></u> <%= linkup_mentions(auto_link(h tweet.text)) %> <div class="time_ago"> <%= link_to distance_of_time_in_words_to_now(tweet.created_at) , tweet %> <% else %> <div class="flit_message_container"> <u> <a href="http://twitter.com/<%= tweet.from_user %>"> <%= tweet.from_user %></a></u> <%= linkup_mentions(auto_link(h tweet.text)) %> <div class="time_ago"> <%= link_to distance_of_time_in_words_to_now(tweet.created_at) , tweet %> <% end %> But I'm having trouble doing it for multiple user nicknames. @vouch = Vouch.find(:all, :select => "vouched_user_nickname", :group => 'vouched_user_nickname' ) Any ideas would be greatly appreciated. I'm a rails noob.

    Read the article

  • How to insert in a blog sharing links to visitors Tweet, Facebook and so on social networks?

    - by Andry
    I am developing a web blog using ASP.NET, but I guess that the tech details like this, here, is not important. My aim is to insert in every post I create those nice buttons to the social networks account of my visitors so that they can quote or post the link to the blog entry in their space. How can I do this? I guess it also de3pend on the social network I want to use. Lets say, now, that I want to have links to Facebook, Tweet and Google circle accounts. Thankyou.

    Read the article

  • Why does the interpretted order seem different from what I expect?

    - by inspectorG4dget
    I have a problem that I have not faced before: It seems that the order of interpretation in my program is somehow different from what I expect. I have written a small Twitter client. It takes a few seconds for my program to actually post a tweet after I click the "GO" button (which can also be activated by hitting ENTER on the keyboard). I don't want to click multiple times within this time period thinking that I hadn't clicked it the first time. Therefore, when the button is clicked, I would like the label text to display something that tells me that the button has been clicked. I have implemented this message by altering the label text before I send the tweet across. However, for some reason, the message does not display until the tweet has been attempted. But since I have a confirmation message after the tweet, I never get to see this message and my original problem goes unsolved. I would really appreciate any help. Here is the relevant code: class SimpleTextBoxForm(Form): def init(self): # set window properties self.Text = "Tweeter" self.Width = 235 self.Height = 250 #tweet away self.label = Label() self.label.Text = "Tweet Away..." self.label.Location = Point(10, 10) self.label.Height = 25 self.label.Width = 200 #get the tweet self.tweetBox = TextBox() self.tweetBox.Location = Point(10, 45) self.tweetBox.Width = 200 self.tweetBox.Height = 60 self.tweetBox.Multiline = True self.tweetBox.WordWrap = True self.tweetBox.MaxLength = 140; #ask for the login ID self.askLogin = Label() self.askLogin.Text = "Login:" self.askLogin.Location = Point(10, 120) self.askLogin.Height = 20 self.askLogin.Width = 60 self.login = TextBox() self.login.Text= "" self.login.Location = Point(80, 120) self.login.Height = 40 self.login.Width = 100 #ask for the password self.askPass = Label() self.askPass.Text = "Password:" self.askPass.Location = Point(10, 150) self.askPass.Height = 20 self.askPass.Width = 60 # display password box with character hiding self.password = TextBox() self.password.Location = Point(80, 150) self.password.PasswordChar = "x" self.password.Height = 40 self.password.Width = 100 #submit button self.button1 = Button() self.button1.Text = 'Tweet' self.button1.Location = Point(10, 180) self.button1.Click += self.update self.AcceptButton = self.button1 #pack all the elements of the form self.Controls.Add(self.label) self.Controls.Add(self.tweetBox) self.Controls.Add(self.askLogin) self.Controls.Add(self.login) self.Controls.Add(self.askPass) self.Controls.Add(self.password) self.Controls.Add(self.button1) def update(self, sender, event): if not self.password.Text: self.label.Text = "You forgot to enter your password..." else: self.tweet(self.tweetBox.Text, self.login.Text, self.password.Text) def tweet(self, msg, login, password): self.label.Text = "Attempting Tweet..." # this should be executed before sending the tweet is attempted. But this seems to be executed only after the try block try: success = 'Tweet successfully completed... yay!\n' + 'At: ' + time.asctime().split()[3] ServicePointManager.Expect100Continue = False Twitter().UpdateAsXML(login, password, msg) except: error = 'Unhandled Exception. Tweet unsuccessful' self.label.Text = error else: self.label.Text = success self.tweetBox.Text = ""

    Read the article

  • Why does the interpreted order seem different from what I expect?

    - by inspectorG4dget
    I have a problem that I have not faced before: It seems that the order of interpretation in my program is somehow different from what I expect. I have written a small Twitter client. It takes a few seconds for my program to actually post a tweet after I click the "GO" button (which can also be activated by hitting ENTER on the keyboard). I don't want to click multiple times within this time period thinking that I hadn't clicked it the first time. Therefore, when the button is clicked, I would like the label text to display something that tells me that the button has been clicked. I have implemented this message by altering the label text before I send the tweet across. However, for some reason, the message does not display until the tweet has been attempted. But since I have a confirmation message after the tweet, I never get to see this message and my original problem goes unsolved. I would really appreciate any help. Here is the relevant code: class SimpleTextBoxForm(Form): def __init__(self): # set window properties self.Text = "Tweeter" self.Width = 235 self.Height = 250 #tweet away self.label = Label() self.label.Text = "Tweet Away..." self.label.Location = Point(10, 10) self.label.Height = 25 self.label.Width = 200 #get the tweet self.tweetBox = TextBox() self.tweetBox.Location = Point(10, 45) self.tweetBox.Width = 200 self.tweetBox.Height = 60 self.tweetBox.Multiline = True self.tweetBox.WordWrap = True self.tweetBox.MaxLength = 140; #ask for the login ID self.askLogin = Label() self.askLogin.Text = "Login:" self.askLogin.Location = Point(10, 120) self.askLogin.Height = 20 self.askLogin.Width = 60 self.login = TextBox() self.login.Text= "" self.login.Location = Point(80, 120) self.login.Height = 40 self.login.Width = 100 #ask for the password self.askPass = Label() self.askPass.Text = "Password:" self.askPass.Location = Point(10, 150) self.askPass.Height = 20 self.askPass.Width = 60 # display password box with character hiding self.password = TextBox() self.password.Location = Point(80, 150) self.password.PasswordChar = "x" self.password.Height = 40 self.password.Width = 100 #submit button self.button1 = Button() self.button1.Text = 'Tweet' self.button1.Location = Point(10, 180) self.button1.Click += self.update self.AcceptButton = self.button1 #pack all the elements of the form self.Controls.Add(self.label) self.Controls.Add(self.tweetBox) self.Controls.Add(self.askLogin) self.Controls.Add(self.login) self.Controls.Add(self.askPass) self.Controls.Add(self.password) self.Controls.Add(self.button1) def update(self, sender, event): if not self.password.Text: self.label.Text = "You forgot to enter your password..." else: self.tweet(self.tweetBox.Text, self.login.Text, self.password.Text) def tweet(self, msg, login, password): self.label.Text = "Attempting Tweet..." # this should be executed before sending the tweet is attempted. But this seems to be executed only after the try block try: success = 'Tweet successfully completed... yay!\n' + 'At: ' + time.asctime().split()[3] ServicePointManager.Expect100Continue = False Twitter().UpdateAsXML(login, password, msg) except: error = 'Unhandled Exception. Tweet unsuccessful' self.label.Text = error else: self.label.Text = success self.tweetBox.Text = ""

    Read the article

  • Using LINQ to Twitter OAuth with Windows 8

    - by Joe Mayo
    In previous posts, I explained how to use LINQ to Twitter with Windows 8, but the example was a Twitter Search, which didn’t require authentication. Much of the Twitter API requires authentication, so this post will explain how you can perform OAuth authentication with LINQ to Twitter in a Windows 8 Metro-style application. Getting Started I have earlier posts on how to create a Windows 8 app and add pages, so I’ll assume it isn’t necessary to repeat here. One difference is that I’m using Visual Studio 2012 RC and some of the terminology and/or library code might be slightly different.  Here are steps to get started: Create a new Windows metro style app, selecting the Blank App project template. Create a new Basic Page and name it OAuth.xaml.  Note: You’ll receive a prompt window for adding files and you should click Yes because those files are necessary for this demo. Add a new Basic Page named TweetPage.xaml. Open App.xaml.cs and change !rootFrame.Navigate(typeof(MainPage)) to !rootFrame.Navigate(typeof(TweetPage)). Now that the project is set up you’ll see the reason why authentication is required by setting up the TweetPage. Setting Up to Tweet a Status In this section, I’ll show you how to set up the XAML and code-behind for a tweet.  The tweet logic will check to see if the user is authenticated before performing the tweet. To tweet, I put a TextBox and Button on the XAML page. The following code omits most of the page, concentrating primarily on the elements of interest in this post: <StackPanel Grid.Row="1"> <TextBox Name="TweetTextBox" Margin="15" /> <Button Name="TweetButton" Content="Tweet" Click="TweetButton_Click" Margin="15,0" /> </StackPanel> Given the UI above, the user types the message they want to tweet, and taps Tweet. This invokes TweetButton_Click, which checks to see if the user is authenticated.  If the user is not authenticated, the app navigates to the OAuth page.  If they are authenticated, LINQ to Twitter does an UpdateStatus to post the user’s tweet.  Here’s the TweetButton_Click implementation: void TweetButton_Click(object sender, RoutedEventArgs e) { PinAuthorizer auth = null; if (SuspensionManager.SessionState.ContainsKey("Authorizer")) { auth = SuspensionManager.SessionState["Authorizer"] as PinAuthorizer; } if (auth == null || !auth.IsAuthorized) { Frame.Navigate(typeof(OAuthPage)); return; } var twitterCtx = new TwitterContext(auth); Status tweet = twitterCtx.UpdateStatus(TweetTextBox.Text); new MessageDialog(tweet.Text, "Successful Tweet").ShowAsync(); } For authentication, this app uses PinAuthorizer, one of several authorizers available in the LINQ to Twitter library. I’ll explain how PinAuthorizer works in the next section. What’s important here is that LINQ to Twitter needs an authorizer to post a Tweet. The code above checks to see if a valid authorizer is available. To do this, it uses the SuspensionManager class, which is part of the code generated earlier when creating OAuthPage.xaml. The SessionState property is a Dictionary<string, object> and I’m using the Authorizer key to store the PinAuthorizer.  If the user previously authorized during this session, the code reads the PinAuthorizer instance from SessionState and assigns it to the auth variable. If the user is authorized, auth would not be null and IsAuthorized would be true. Otherwise, the app navigates the user to OAuthPage.xaml, which I’ll discuss in more depth in the next section. When the user is authorized, the code passes the authorizer, auth, to the TwitterContext constructor. LINQ to Twitter uses the auth instance to build OAuth signatures for each interaction with Twitter.  You no longer need to write any more code to make this happen. The code above accepts the tweet just posted in the Status instance, tweet, and displays a message with the text to confirm success to the user. You can pull the PinAuthorizer instance from SessionState, instantiate your TwitterContext, and use it as you need. Just remember to make sure you have a valid authorizer, like the code above. As shown earlier, the code navigates to OAuthPage.xaml when a valid authorizer isn’t available. The next section shows how to perform the authorization upon arrival at OAuthPage.xaml. Doing the OAuth Dance This section shows how to authenticate with LINQ to Twitter’s built-in OAuth support. From the user perspective, they must be navigated to the Twitter authentication page, add credentials, be navigated to a Pin number page, and then enter that Pin in the Windows 8 application. The following XAML shows the relevant elements that the user will interact with during this process. <StackPanel Grid.Row="2"> <WebView x:Name="OAuthWebBrowser" HorizontalAlignment="Left" Height="400" Margin="15" VerticalAlignment="Top" Width="700" /> <TextBlock Text="Please perform OAuth process (above), enter Pin (below) when ready, and tap Authenticate:" Margin="15,15,15,5" /> <TextBox Name="PinTextBox" Margin="15,0,15,15" Width="432" HorizontalAlignment="Left" IsEnabled="False" /> <Button Name="AuthenticatePinButton" Content="Authenticate" Margin="15" IsEnabled="False" Click="AuthenticatePinButton_Click" /> </StackPanel> The WebView in the code above is what allows the user to see the Twitter authentication page. The TextBox is for entering the Pin, and the Button invokes code that will take the Pin and allow LINQ to Twitter to complete the authentication process. As you can see, there are several steps to OAuth authentication, but LINQ to Twitter tries to minimize the amount of code you have to write. The two important parts of the code to make this happen are the part that starts the authentication process and the part that completes the authentication process. The following code, from OAuthPage.xaml.cs, shows a couple events that are instrumental in making this process happen: public OAuthPage() { this.InitializeComponent(); this.Loaded += OAuthPage_Loaded; OAuthWebBrowser.LoadCompleted += OAuthWebBrowser_LoadCompleted; } The OAuthWebBrowser_LoadCompleted event handler enables UI controls when the browser is done loading – notice that the TextBox and Button in the previous XAML have their IsEnabled attributes set to False. When the Page.Loaded event is invoked, the OAuthPage_Loaded handler starts the OAuth process, shown here: void OAuthPage_Loaded(object sender, RoutedEventArgs e) { auth = new PinAuthorizer { Credentials = new InMemoryCredentials { ConsumerKey = "", ConsumerSecret = "" }, UseCompression = true, GoToTwitterAuthorization = pageLink => Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => OAuthWebBrowser.Navigate(new Uri(pageLink, UriKind.Absolute))) }; auth.BeginAuthorize(resp => Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { switch (resp.Status) { case TwitterErrorStatus.Success: break; case TwitterErrorStatus.RequestProcessingException: case TwitterErrorStatus.TwitterApiError: new MessageDialog(resp.Error.ToString(), resp.Message).ShowAsync(); break; } })); } The PinAuthorizer, auth, a field of this class instantiated in the code above, assigns keys to the Credentials property. These are credentials that come from registering an application with Twitter, explained in the LINQ to Twitter documentation, Securing Your Applications. Notice how I use Dispatcher.RunAsync to marshal the web browser navigation back onto the UI thread. Internally, LINQ to Twitter invokes the lambda expression assigned to GoToTwitterAuthorization when starting the OAuth process.  In this case, we want the WebView control to navigate to the Twitter authentication page, which is defined with a default URL in LINQ to Twitter and passed to the GoToTwitterAuthorization lambda as pageLink. Then you need to start the authorization process by calling BeginAuthorize. This starts the OAuth dance, running asynchronously.  LINQ to Twitter invokes the callback assigned to the BeginAuthorize parameter, allowing you to take whatever action you need, based on the Status of the response, resp. As mentioned earlier, this is where the user performs the authentication process, enters the Pin, and clicks authenticate. The handler for authenticate completes the process and saves the authorizer for subsequent use by the application, as shown below: void AuthenticatePinButton_Click(object sender, RoutedEventArgs e) { auth.CompleteAuthorize( PinTextBox.Text, completeResp => Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { switch (completeResp.Status) { case TwitterErrorStatus.Success: SuspensionManager.SessionState["Authorizer"] = auth; Frame.Navigate(typeof(TweetPage)); break; case TwitterErrorStatus.RequestProcessingException: case TwitterErrorStatus.TwitterApiError: new MessageDialog(completeResp.Error.ToString(), completeResp.Message).ShowAsync(); break; } })); } The PinAuthorizer CompleteAuthorize method takes two parameters: Pin and callback. The Pin is from what the user entered in the TextBox prior to clicking the Authenticate button that invoked this method. The callback handles the response from completing the OAuth process. The completeResp holds information about the results of the operation, indicated by a Status property of type TwitterErrorStatus. On success, the code assigns auth to SessionState. You might remember SessionState from the previous description of TweetPage – this is where the valid authorizer comes from. After saving the authorizer, the code navigates the user back to TweetPage, where they can type in a message, click the Tweet button, and observe that they have successfully tweeted. Summary You’ve seen how to get started with using LINQ to Twitter in a Metro-style application. The generated code contained a SuspensionManager class with way to manage information across multiple pages via its SessionState property. You also saw how LINQ to Twitter performs authorization in two steps of starting the process and completing the process when the user provides a Pin number. Remember to marshal callback thread back onto the UI – you saw earlier how to use Dispatcher.RunAsync to accomplish this. There were a few steps in the process, but LINQ to Twitter did minimize the amount of code you needed to write to make it happen. You can download the MetroOAuthDemo.zip sample on the LINQ to Twitter Samples Page.   @JoeMayo

    Read the article

  • Provocative Tweets From the Dachis Social Business Summit

    - by Mike Stiles
    On June 20, all who follow social business and how social is changing how we do business and internal business structures, gathered in London for the Dachis Social Business Summit. In addition to Oracle SVP Product Development, Reggie Bradford, brands and thought leaders posed some thought-provoking ideas and figures. Here are some of the most oft-tweeted points, and our thoughts that they provoked. Tweet: The winners will be those who use data to improve performance.Thought: Everyone is dwelling on ROI. Why isn’t everyone dwelling on the opportunity to make their product or service better (as if that doesn’t have an effect on ROI)? Big data can improve you…let it. Tweet: High performance hinges on integrated teams that interact with each other.Thought: Team members may work well with each other, but does the team as a whole “get” what other teams are doing? That’s the key to an integrated, companywide workforce. (Internal social platforms can facilitate that by the way). Tweet: Performance improvements come from making the invisible visible.Thought: Many of the factors that drive customer behavior and decisions are invisible. Through social, customers are now showing us what we couldn’t see before…if we’re paying attention. Tweet: Games have continuous feedback, which is why they’re so engaging.  Apply that to business operations.Thought: You think your employees have an obligation to be 100% passionate and engaged at all times about making you richer. Think again. Like customers, they must be motivated. Visible insight that they’re advancing on their goals helps. Tweet: Who can add value to the data?  Data will tend to migrate to where it will be most effective.Thought: Not everybody needs all the data. One team will be able to make sense of, use, and add value to data that may be irrelevant to another team. Like a strategized football play, the data has to get sent to the spot on the field where it’s needed most. Tweet: The sale isn’t the light at the end of the tunnel, it’s the start of a new marketing cycle.Thought: Another reason the ROI question is fundamentally flawed. The sale is not the end of the potential return on investment. After-the-sale service and nurturing begins where the sales “victory” ends. Tweet: A dead sale is one that’s not shared.  People must be incentivized to share.Thought: Guess what, customers now know their value to you as marketers on your behalf. They’ll tell people about your product, but you’ve got to answer, “Why should I?” And you’ve got to answer it with something substantial, not lame trinkets. Tweet: Social user motivations are competition, affection, excellence and curiosity.Thought: Your followers will engage IF; they can get something for doing it, love your culture so much they want you to win, are consistently stunned at the perfection and coolness of your products, or have been stimulated enough to want to know more. Tweet: In Europe, 92% surveyed said they couldn’t care less about brands.Thought: Oh well, so much for loving you or being impressed enough with your products & service that they want you to win. We’ve got a long way to go. Tweet: A complaint is a gift.Thought: Our instinct where complaints are concerned is to a) not listen, b) dismiss the one who complains as a kook, c) make excuses, and d) reassure ourselves with internal group-think that they’re wrong and we’re right. It’s the perfect recipe for how to never, ever grow or get better. In a way, this customer cares more than you do. Tweet: 78% of consumers think peer recommendation is the best form of advertising.  Eventually, engagement is going to eat advertising.Thought: Why is peer recommendation best? Trust. If a friend tells me how great a movie was, I believe him. He has credibility with me. He’s seen it, and he could care less if I buy a ticket. He’s telling me it was awesome because he sincerely believes that it was.  That’s gold. Tweet: 86% of customers are willing to pay more for a better customer experience. Thought: This “how mad can we make our customers without losing them” strategy has to end. The customer experience has actual monetary value, money you’re probably leaving on the table. @mikestilesPhoto: stock.xchng

    Read the article

  • How to Hashtag (Without Being #Annoying)

    - by Mike Stiles
    The right tool in the wrong hands can be a dangerous thing. Giving a chimpanzee a chain saw would not be a pretty picture. And putting Twitter hashtags in the hands of social marketers who were never really sure how to use them can be equally unattractive. Boiled down, hashtags are for search and organization of tweets. A notch up from that, they can also be used as part of a marketing strategy. In terms of search, if you’re in the organic apple business, you want anyone who searches “organic” on Twitter to see your posts about your apples. It’s keyword tactics not unlike web site keyword search tactics. So get a clear idea of what keywords are relevant for your tweet. It’s reasonable to include #organic in your tweet. Is it fatal if you don’t hashtag the word? It depends on the person searching. If they search “organic,” your tweet’s going to come up even if you didn’t put the hashtag in front of it. If the searcher enters “#organic,” your tweet needs the hashtag. Err on the side of caution and hashtag it so it comes up no matter how the searcher enters it. You’ll also want to hashtag it for the second big reason people hashtag, organization. You can follow a hashtag. So can the rest of the Twitterverse. If you’re that into organic munchies, you can set up a stream populated only with tweets hashtagged #organic. If you’ve established a hashtag for your brand, like #nobugsprayapples, you (and everyone else) can watch what people are tweeting about your company. So what kind of hashtags should you include? They should be directly related to the core message of your tweet. Ancillary or very loosely-related hashtags = annoying. Hashtagging your brand makes sense. Hashtagging your core area of interest makes sense. Creating a specific event or campaign hashtag you want others to include and spread makes sense (the burden is on you to promote it and get it going). Hashtagging nearly every word in the tweet is highly annoying. Far and away, the majority of hashtagged words in such tweets have no relevance, are not terms that would be searched, and are not terms needed for categorization. It looks desperate and spammy. Two is fine. One is better. And it is possible to tweet with --gasp-- no hashtags! Make your hashtags as short as you can. In fact, if your brand’s name really is #nobugsprayapples, you’re burning up valuable, limited characters and risking the inability of others to retweet with added comments. Also try to narrow your topic hashtag down. You’ll find a lot of relevant users with #organic, but a lot of totally uninterested users with #food. Just as you can join online forums and gain credibility and a reputation by contributing regularly to that forum, you can follow hashtagged topics and gain the same kind of credibility in your area of expertise. Don’t just parachute in for the occasional marketing message. And if you’re constantly retweeting one particular person, stop it. It’s kissing up and it’s obvious. Which brings us to the king of hashtag annoyances, “hashjacking.” This is when you see what terms are hot and include them in your marketing tweet as a hashtag, even though it’s unrelated to your content. Justify it all you want, but #justinbieber has nothing to do with your organic apples. Equally annoying, piggybacking on a popular event’s hashtag to tweet something not connected to the event. You’re only fostering ill will and mistrust toward your account from the people you’ve tricked into seeing your tweet. Lastly, don’t @ mention people just to make sure they see your tweet. If the tweet’s not for them or about them, it’s spammy. What I haven’t covered is use of the hashtag for comedy’s sake. You’ll see this a lot and is a matter of personal taste. No one will search these hashtagged terms or need to categorize then, they’re just there for self-expression and laughs. Twitter is, after all, supposed to be fun.  What are some of your biggest Twitter pet peeves? #blogsovernow

    Read the article

  • LINQ to Twitter Queries with LINQPad

    - by Joe Mayo
    LINQPad is a popular utility for .NET developers who use LINQ a lot.  In addition to standard SQL queries, LINQPad also supports other types of LINQ providers, including LINQ to Twitter.  The following sections explain how to set up LINQPad for making queries with LINQ to Twitter. LINQPad comes in a couple versions and this example uses LINQPad4, which runs on the .NET Framework 4.0. 1. The first thing you'll need to do is set up a reference to the LinqToTwitter.dll. From the Query menu, select query properties. Click the Browse button and find the LinqToTwitter.dll binary. You should see something similar to the Query Properties window below. 2. While you have the query properties window open, add the namespace for the LINQ to Twitter types.  Click the Additional Namespace Imports tab and type in LinqToTwitter. The results are shown below: 3. The default query type, when you first start LINQPad, is C# Expression, but you'll need to change this to support multiple statements.  Change the Language dropdown, on the Main window, to C# Statements. 4. To query LINQ to Twitter, instantiate a TwitterContext, by typing the following into the LINQPad Query window: var ctx = new TwitterContext(); Note: If you're getting syntax errors, go back and make sure you did steps #2 and #3 properly. 5. Next, add a query, but don't materialize it, like this: var tweets = from tweet in ctx.Status where tweet.Type == StatusType.Public select new { tweet.Text, tweet.Geo, tweet.User }; 6. Next, you want the output to be displayed in the LINQPad grid, so do a Dump, like this: tweets.Dump(); The following image shows the final results:   That was an unauthenticated query, but you can also perform authenticated queries with LINQ to Twitter's support of OAuth.  Here's an example that uses the PinAuthorizer (type this into the LINQPad Query window): var auth = new PinAuthorizer { Credentials = new InMemoryCredentials { ConsumerKey = "", ConsumerSecret = "" }, UseCompression = true, GoToTwitterAuthorization = pageLink => Process.Start(pageLink), GetPin = () => { // this executes after user authorizes, which begins with the call to auth.Authorize() below. Console.WriteLine("\nAfter you authorize this application, Twitter will give you a 7-digit PIN Number.\n"); Console.Write("Enter the PIN number here: "); return Console.ReadLine(); } }; // start the authorization process (launches Twitter authorization page). auth.Authorize(); var ctx = new TwitterContext(auth, "https://api.twitter.com/1/", "https://search.twitter.com/"); var tweets = from tweet in ctx.Status where tweet.Type == StatusType.Public select new { tweet.Text, tweet.Geo, tweet.User }; tweets.Dump(); This code is very similar to what you'll find in the LINQ to Twitter downloadable source code solution, in the LinqToTwitterDemo project.  For obvious reasons, I changed the value assigned to ConsumerKey and ConsumerSecret, which you'll have to obtain by visiting http://dev.twitter.com and registering your application. One tip, you'll probably want to make this easier on yourself by creating your own DLL that encapsulates all of the OAuth logic and then call a method or property on you custom class that returns a fully functioning TwitterContext.  This will help avoid adding all this code every time you want to make a query. Now, you know how to set up LINQPad for LINQ to Twitter, perform unauthenticated queries, and perform queries with OAuth. Joe

    Read the article

  • Twitter status id conundrum

    - by jamiet
    I have an interest, a slightly perverse one some might say, in using online services and trying to figure out what the underlying (logical) data model is and in this day and age Twitter is one that lends itself very well to scrutiny. Consider this recent tweet of mine: The URL that enables you to see that tweet is http://twitter.com/jamiet/status/12154647354. We can interpret that URL to mean "a tweet by jamiet with an id of 12154647354" and hence we might further assume that the unique identifier for the tweet is {jamiet,12154647354}. However, its well-known that Twitter gives each status a unique ID regardless of who tweeted it so we might expect we could reach that tweet just by using a URL of http://twitter.com/status/12154647354 however (at the time of writing) that only redirects to Twitter's homepage. That seems strange to me especially given that we can use Twitter's API to access information about that tweet using only the id of the status. Witness http://api.twitter.com/1/statuses/show/12154647354.xml: [We can also access a JSON version of that information using http://api.twitter.com/1/statuses/show/12154647354.json] I'm puzzled as to why a tweet can't be accessed using on the main twitter website using the id alone. Anyone have any suggestions? @jamiet Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

    Read the article

  • How to Tweet from multiple acounts with twitter Gem in Rails?

    - by Jmlevick
    I have an application wich has Oauth access using Twitter as provider. I also have the ability to ask the logged user permisson to Read and Write in his/her account and once a user authorized the app, I can send tweets as the user with something like: u = User.find(id) u.twitter.update("Some-Status-Here") in the rails console... What I want to do is to Tweet as all the users in one command, but if I try something like: u = User.all u.twitter.update("Some-Status-Here") I get this error: undefined method `twitter' for #<Array:0x00000002e2f188> How can I tweet as all the users in one command? What am I doing wrong? I feel it is a very basic thing I'm missing... Can someone help me? Thank You.

    Read the article

  • Cannot Display Chinese Character in my PHP code

    - by Jun1st
    I want to display my Twitter Info in my blog. So I write some code to get it. the issue I got is that Chinese characters displayed as unknown code. Here is the test code. Could anyone take a look and help? Thanks <html> <title>Twitter Test</title> <body> <?php function mystique_objectToArray($object){ if(!is_object($object) && !is_array($object)) return $object; if(is_object($object)) $object = get_object_vars($object); return array_map('mystique_objectToArray', $object); } define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' ); require_once('/home/jun1st/jun1stfeng.com/wp-includes/class-snoopy.php'); $snoopy = new Snoopy; $response = @$snoopy->fetch("http://twitter.com/users/show/jun1st.json"); if ($response) $userdata = json_decode($snoopy->results, true); else $error = true; $response = @$snoopy->fetch("http://twitter.com/statuses/user_timeline/jun1st.json"); if ($response) $tweets = json_decode($snoopy->results, true); else $error = true; if(!$error): // for php < 5 (included JSON returns object) $userdata = mystique_objectToArray($userdata); $tweets = mystique_objectToArray($tweets); $twitdata = array(); $twitdata['user']['profile_image_url'] = $userdata['profile_image_url']; $twitdata['user']['name'] = $userdata['name']; $twitdata['user']['screen_name'] = $userdata['screen_name']; $twitdata['user']['followers_count'] = $userdata['followers_count']; $i = 0; foreach($tweets as $tweet): $twitdata['tweets'][$i]['text'] = $tweet['text']; $twitdata['tweets'][$i]['created_at'] = $tweet['created_at']; $twitdata['tweets'][$i]['id'] = $tweet['id']; $i++; endforeach; endif; // only show if the twitter data from the database is newer than 6 hours if(is_array($twitdata['tweets'])): ?> <div class="clear-block"> <div class="avatar"><img src="<?php echo $twitdata['user']['profile_image_url']; ?>" alt="<?php echo $twitdata['user']['name']; ?>" /></div> <div class="info"><a href="http://www.twitter.com/jun1st"><?php echo $twitdata['user']['name']; ?> </a><br /><span class="followers"> <?php printf(__("%s followers","mystique"),$twitdata['user']['followers_count']); ?></span></div> </div> <ul> <?php $i = 0; foreach($twitdata['tweets'] as $tweet): $pattern = '/\@(\w+)/'; $replace = '<a rel="nofollow" href="http://twitter.com/$1">@$1</a>'; $tweet['text'] = preg_replace($pattern, $replace , $tweet['text']); $tweet['text'] = make_clickable($tweet['text']); // remove +XXXX $tweettime = substr_replace($tweet['created_at'],'',strpos($tweet['created_at'],"+"),5); $link = "http://twitter.com/".$twitdata['user']['screen_name']."/statuses/".$tweet['id']; echo '<li><span class="entry">' . $tweet['text'] .'<a class="date" href="'.$link.'" rel="nofollow">'.$tweettime.'</a></span></li>'; $i++; if ($i == $twitcount) break; endforeach; ?> </ul> <? endif?> ?> </body> </html>

    Read the article

  • Parsing a tweet to extract hashtags into an array in Python.

    - by Scott
    I am having a heck of a time taking the information in a tweet including hashtags, and pulling each hashtag into an array using Python. I am embarrassed to even put what I have been trying thus far. For example, "I love #stackoverflow because #people are very #helpful!" This should pull the 3 hashtags into an array.

    Read the article

  • Tweet @anywhere ou Twitter externalisé. Le site de micro-blogging arrivera-t-il à coloniser le web ?

    Tweet @anywhere ou Twitter externalisé Le site de micro-blogging arrivera-t-il à coloniser le web ? Twitter tente de conquérir le web. Certes j'extrapole, mais la réalité est assez proche surtout depuis le projet baptisé @anywhere. Les développeurs du réseau à la branche oisive planchent en effet depuis quelques temps sur ce projet afin d'intégrer de manière encore plus efficace le système de micro-blogging aux différents sites tiers. L'évolution première de cette nouvelle fonctionnalité serait la réduction de la complexité d'intégration et la légèreté de l'API. Les sites pourront offrir à leurs membres la possibilité d'un accès direct à leur compte Twi...

    Read the article

  • Tweeting about Oracle Applications Usability: Points to Consider

    - by ultan o'broin
    Here are a few pointers to anyone interested in tweeting about Oracle Applications usability or user experience (UX). These are based on my own experiences and practice, and may not necessarily reflect the views of Oracle, of course (touché, see the footer). If you are an Oracle employee and tweet about our offerings, then read up and follow the corporate social media policy. For the record, I tweet under the following account names: @ultan, @localization, @gamifyOracle, and @usableapps. The last two are supposedly Oracle subject-dedicated, but I mix it up on occassion. Fill out your Twitter account profile, and add a profile picture too. Disclose your interest. Don’t leave either the profile or image blank if you want to be taken seriously (or followed by me). Don’t tweet from a locked down Twitter account, as the message cannot be circulated to anyone who doesn't follow you. Open up the account if you really want to get that UX message out. Stay on message. The usable apps website, Misha Vaughan's VoX blog, and the Oracle Applications blog are good sources of UX messages and information, but you can find many other product team, individual, and corporate-wide sources with a little bit of searching. Set up a Google Alert with pertinent related keywords to get a daily digest of new information right in your inbox. Be original about it. Add your own insight and wit to the message, were relevant. Just circulating and RTing stock headlines adds no value to your effort or to the reader, and is somewhat lazy, in my opinion. Leave room for RTing of your tweet. So, don’t max out those 140 characters. Keep it under 130 if you want to be RTed without modification (or at all-I am not a fan of modifying tweets [MT], way too much effort for the medium). Remove articles and punctuation marks and use fragments, abbreviations, and so on at will to keep the tweet short enough, but leave keywords intact, as people search on those. Follow any Fusion UX Advocates who are on Twitter too (you can search for these names), and not just Oracle employees. Don't just follow people you like or think like you, or those who you think like you or are like-minded. Take a look at who is following or being followed by other tweeters and er, follow up. Create and socialize others to use an easily remembered or typed hashtag, or use what’s already popularized (for an event or conference, for example). We used #gamifyOracle for the applications UX gamification design jam, and other popular applications UX ones are #fusionapps and #usableapps (or at least I’m trying to popularize it). But, before you start the messaging, if you want to keep a record of the hashtag traffic, then set it up with an archiving service. Twitter’s own tweet lifespan is short. Don't mix up hashtags (#) with Twitter handles (@) that have the same name. Sending a tweet to @gamifyOracle will just be seen by @gamifyOracle (me) and any followers we have in common. Sending it to #gamifyOracle is seen by anyone following or searching for that hashtag. No dissing the competition. But there is no rule about not following them on Twitter to see the market reactions to Oracle announcements and this can even let you can tailor your own message accordingly. Don’t be boring. Mix it up a bit. Every 10th or so tweet, divert into other areas of interest, personal ones, even. No constant “I just received K+ in this and that” or “I just checked into wherever” on foursquare pouring into the Twittersteam, please. I just don’t care and will probably unfollow such people pretty quickly. And now, your Twitter tips and experiences with this subject? Them go in the comments...

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >