Code
This file contains hidden or 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
<?php | |
$api_key = "APIキー"; | |
wp_enqueue_script("twitter-anywhere", | |
"http://platform.twitter.com/anywhere.js?id={$api_key}&v=1"); | |
add_action("wp_head", "twitter_anywhere"); | |
function twitter_anywhere() | |
{ | |
echo '<script type="text/javascript">'; | |
echo 'twttr.anywhere(onAnywhereLoad);'; | |
echo 'function onAnywhereLoad(twitter) { twitter.hovercards(); }'; | |
echo '</script>'; | |
} | |
?> |
Screen shot
Note
Description | Twitterの@AnywhereをWPに導入する |
---|---|
WordPress Ver. | 3.3.1 |
Via | Setup Twitter @Anywhere for WordPress in Seconds! |