Posts

Showing posts with the label twitter

Fatal error: Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1 in twitteroauth/OAuth.php on line 120 in laravel

Fatal error: Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1 in twitteroauth/OAuth.php on line 120   Or   Cannot use Abraham Williams Twitter library in Laravel 4 Follow the steps:   Open OAuth.php Remove this condition if (!class_exists('OAuthException')) { class OAuthException extends Exception { // pass } }  

How to add custom design twitter feed in php website?

If you are looking for twitter feed which you can customized your self then Simple copy and paste this code in your page for twitter feed and change the twitter username <?php     $username = "xyz"; // change the username     $limit = 5;     $feed = 'https://api.twitter.com/1/statuses/user_timeline.rss?screen_name='.$username.'&count='.$limit;     $tweets = file_get_contents($feed);   $tweets = str_replace("&", "&", $tweets); $tweets = str_replace("<", "<", $tweets); $tweets = str_replace(">", ">", $tweets); $tweet = explode("<item>", $tweets);     $tcount = count($tweet) - 1; for ($i = 1; $i <= $tcount; $i++) {     $endtweet = explode("</item>", $tweet[$i]);     $title = explode("<title>", $endtweet[0]);     $content = explode("</title>", $title[1]); $content[0] = str_replac

How to add twitter share button in our website?

Simple copy and paste this code to add a twitter link in your website  <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <a href="https://twitter.com/share" class="twitter-share-button"           data-url="Your website URL"           data-via="website"           data-text="content you want to share"           data-related="name"           data-count="none">   tweet </a> Now you can share your your content on twitter.