I am getting the latest tweets from my tweet accounts by using the js
"<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js">
</script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/bunswap.json?callback=twitterCallback2&count=1">
</script> "
now i want to add a retweet button using twitter web intent,i could do that
like
"<p>Retweet </p>"
but i am not getting how to get the tweet id of the displayed tweet ,this id is a hard coded one , i want to get it dynamically
my intent is to display a tweet from my twitter account and add re tweet functionality.
i have seen this on sites like http://www.niemanlab.org/
Thank You
Related
I'd like to find out how to embed a specific tweet + comments.
I know how to embed the whole timeline (with Twitter widgets):
<a class="twitter-timeline" href="https://twitter.com/stats_canada" data-widget-id="608870269030137856">Tweets by #stats_canada</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
but I just need to embed one tweet using that widget (if possible).
For example this particular one:
https://twitter.com/stats_canada/status/230694020031078400?s=17
You can embed that specific tweet using this code:
<blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">The average Canadian says sorry over 45,000 times a day.</p>— Stats Canada (#stats_canada) August 1, 2012</blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
However, replies are different. The current twitter API doesn't seem to allow for embedding of entire conversations. What you can do after embedding this tweet is getting the embed quote for each reply, and then unchecking the "Include parent tweet" for each embed code. You can then add each one below the original tweet.
I've followed the guide here to add multiple widgets using the same widget id and this works perfectly fine for User timeline.
Snippet ----
<a class="twitter-timeline" href="https://twitter.com/benward" data-widget-id="[id]" data-screen-name="benward">
<a class="twitter-timeline" href="https://twitter.com/endform" data-widget-id="[id]" data-screen-name="endform">
<a class="twitter-timeline" href="https://twitter.com/kang" data-widget-id="[id]" data-screen-name="kang">
<a class="twitter-timeline" href="https://twitter.com/brianellin" data-widget-id="[id]" data-screen-name="brianellin">
What I would want to do is do the same( show different widgets ) for multiple hashtags - #MH17, #MH370 on the same page. But these tags change for each article on a page.
I want to know if either of these is possible.
Can I make the same guide available for a search query to this and this without creating a widget manually from the Twitter page. Timeline changes when I change the "data-screen-name" property. Is there something like "data-hashtag-name"?
Is it possible to use Twitter API or something to automate the process of creating a widget from the browser using Auth Token - Secret?
May be this help you .
Here i am sending you some example using this I am get json and render html div
Here is a sample code and demo you can use for search in twitter
1) http://www.codexworld.com/create-custom-twitter-widget-using-php/
2)you can also look into this examle may be this will full fill your requirement .
http://dev.kim-maida.com/twitter/
3) here is demo code and code sample link.
https://github.com/kmaida/twitter-timeline-php
did you see these pages?
https://dev.twitter.com/web/embedded-timelines/search
https://twitter.com/settings/widgets/new/search
You can do this:
corgi is the sample hashtag:
<a class="twitter-timeline" href="https://twitter.com/hashtag/corgi" data-widget-id="612280670367301632">#corgi Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
I am currently creating a Tweet button for my website but have little knowledge of Twitter. I would like the text to say something similar to 'I like' and be followed by the title and url for the current page. I can make it display the text that I would like, or the page title, but cannot seem to get the text AND the page title into the tweet together.
So I would like the tweet to be... 'I like [page title] at Phil's website - [url for specific page]'
Is it possible to get it from meta data and open-graph similar to how facebook works?
Thanks in advance for any help, the code below is taken from the Twitter website with a few edits made.
Tweet<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
I was thinking of setting up some tweet buttons for people to tweet out various sections of a long article using #anchor tags
eg a URL like this
http://www.w3schools.com/html_links.htm#tips
http://www.w3schools.com/html_links.htm#questions
There would be a Tweet button next to each Anchor Tag
Is this possible and will each tweet button have their own unique Count on their respective buttons?
eg
Tweet<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Tweet<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
Many thanks in advance
Cheers
Andy
Twitter disregards #fragments in their tweet button counts so multiple tweet buttons linking to multiple sections of a single page will all have the same count. You can have multiple tweet buttons on a single page with different counts but they will have to be fore separate pages. For example a blog of example.com could have two tweet buttons with different counts but they would have to be for:
example.com/1
example.com/2
A workaround is to play with GET values. You can use this kind of url for the tweeter button :
http://www.w3schools.com/html_links.htm?anchor=tips
http://www.w3schools.com/html_links.htm?anchor=questions
Then, you add some JS to jump to the anchor when the user come from tweeter.
I'm looking into using the Twitter tweet button API, found: here
I have the following code:
<a href="http://twitter.com/share" class="twitter-share-button"
data-url="http://myurl.com/howtouse"
data-counturl="http://myurl.com/howtouse"
data-text="How to use this site"
data-count="vertical"
>Tweet</a>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
My problem comes with the count. When I hit the 'tweet' button, the popup appears. I post to twitter all fine. The problem then comes with when I then click on the count box, which is 0.
The URL of this is: http://twitter.com/#search?q=http%3A%2F%2Fmyurl.com%2Fhowtouse%2F
Which when clicked returns no results even though I can see the tweet in my timeline.
Does anyone have any ideas why the search wouldn't find the link I shared/tweeted and why the count is 0?
Thanks
There are a number of reasons that Tweets don't show up in search that range from quality filtering to time: http://support.twitter.com/articles/66018-my-tweets-or-hashtags-are-missing-from-search
The tweet count being 0 can be an effect of caching. Generally tweet button counts take a few hours to update for performance reasons and are often inaccurate by a % as well.