Created
April 20, 2015 23:46
-
-
Save mcmullengreg/2fdf0aa9b0a64179d6bc to your computer and use it in GitHub Desktop.
Embedded Twitter Feed for Umbraco
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@* Embedded Twitter Feed | |
* --------------------- | |
* Create a widget from Twitter.com FIRST - https://twitter.com/settings/widgets | |
* Embedded Timeline API - https://dev.twitter.com/docs/embedded-timelines | |
* All of these settings are for the local end. User & Search information | |
* Should be setup on the actually widget creation page. | |
* | |
* | |
*@ | |
@{ | |
string widgetID = Parameter.widgetID; | |
string width = Parameter.width; | |
string height = Parameter.height; | |
string linkColor = Parameter.linkColor; | |
string numTweets = (Parameter.numTweets != "") ? Parameter.numTweets : ""; | |
var chrome = ""; | |
@* Boolean values store as string 1 and 0 *@ | |
if ( Parameter.header == "1" ) { | |
chrome += "noheader "; | |
} if ( Parameter.footer == "1" ) { | |
chrome += "nofooter "; | |
} if ( Parameter.scrollbar == "1" ) { | |
chrome += "noscrollbar "; | |
} | |
} | |
<div> | |
<a class="twitter-timeline" | |
data-widget-id="@widgetID" | |
data-link-color="@linkColor" | |
width="@width" | |
height="@height" | |
data-chrome="@chrome" | |
data-tweet-limit="@numTweets"> | |
</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> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment