[email protected] Posted December 6, 2009 Share Posted December 6, 2009 tweetmeme website has a button called "retweet" which could be inserted on any webpage of any site. You just need to insert this script on your page. <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script> When this button is clicked from your website it connects with twitter, takes your twitter credentials, takes the title and link to your webpage and inserts in that twitter account. Inserting could be done with another xml api which I have. I just need help from PHPfreak Guru's and others to develop the same button script on my website. Then lets say phpfreaks.com can call my site using this script and my site allows it to insert tweet and give a count.(same like tweetmeme) Quote Link to comment https://forums.phpfreaks.com/topic/184178-help-me-develop-retweet-button/ Share on other sites More sharing options...
Daniel0 Posted December 6, 2009 Share Posted December 6, 2009 It's just a link like this: http://twitter.com/home/?status=Daniel0+rules Quote Link to comment https://forums.phpfreaks.com/topic/184178-help-me-develop-retweet-button/#findComment-972388 Share on other sites More sharing options...
[email protected] Posted December 6, 2009 Author Share Posted December 6, 2009 At this link http://tweetmeme.com/i/scripts/button.js the code present is (function(){var _url=window.location.href; var _url=_url.replace(/((?:\?|&)?fbc_receiver=.+)?(?:#.*)?$/,""); var url=escape((typeof tweetmeme_url=="string")?tweetmeme_url:((typeof TWEETMEME_URL=="string")?TWEETMEME_URL:_url)).replace(/\+/g,"%2b"); var source=(typeof tweetmeme_source=="string")?escape(tweetmeme_source)(typeof TWEETMEME_SOURCE=="string")?escape(TWEETMEME_SOURCE):false);var style=(typeof tweetmeme_style=="string")?escape(tweetmeme_style)(typeof TWEETMEME_STYLE=="string")?escape(TWEETMEME_STYLE):"normal"); var service=(typeof tweetmeme_service=="string")?escape(tweetmeme_service)(typeof TWEETMEME_SERVICE=="string")?escape(TWEETMEME_SERVICE):false); var service_api=(typeof tweetmeme_service_api=="string")?escape(tweetmeme_service_api)(typeof TWEETMEME_SERVICE_API=="string")?escape(TWEETMEME_SERVICE_API):false); var alias=(typeof tweetmeme_alias=="string")?escape(tweetmeme_alias)(typeof TWEETMEME_ALIAS=="string")?escape(TWEETMEME_ALIAS):false); var src="http://api.tweetmeme.com/button.js"; switch(style){case"compact":var h=20;var w=90;break;case"rednose":var h=61;var w=50;break;default:var h=61;var w=50;break}src+="?url="+url;src+="&style="+style;if(source!=false){src+="&source="+source}if(service){src+="&service="+service}if(service_api){src+="&service_api="+service_api}if(alias){src+="&alias="+alias}document.write('<iframe src="'+src+'" height="'+h+'" width="'+w+'" frameborder="0" scrolling="no"></iframe>'); tweetmeme_url=null;TWEETMEME_URL=null; tweetmeme_source=null; TWEETMEME_SOURCE=null; tweetmeme_service=null; TWEETMEME_SERVICE=null; tweetmeme_service_api=null; TWEETMEME_SERVICE_API=null; tweetmeme_style=null; TWEETMEME_STYLE=null})(); Now when you call this function using a script <script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script> It inserts a button(app 100X100 px) on your webpage... Now instead on tweetmeme people should be able to call http://MYSITE.com/i/scripts/button.js Quote Link to comment https://forums.phpfreaks.com/topic/184178-help-me-develop-retweet-button/#findComment-972412 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.