Advertisement
mhorning

TweetboxTest

Aug 15th, 2012
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.43 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <script>
  6.  
  7.     if(!navigator.geolocation) {
  8.       alert('your browser doesnt support geolocation');
  9.     }
  10.       else {
  11.           navigator.geolocation.getCurrentPosition (success, error);
  12.     }
  13.     function success(position) {
  14.    
  15.         var lat=position.coords.latitude;
  16.         var lng=position.coords.longitude;
  17.         alert(lat + ', ' +lng);
  18.     }
  19.     function error(error) {
  20.         alert('sorry an error occurred:'+error);
  21.        
  22.     }
  23.    
  24. </script>
  25.  
  26.  
  27. <script src="http://platform.twitter.com/anywhere.js?id=tKROGbRIvKwAjRgo29RjvA&amp;v=1" type="text/javascript"></script>
  28.    
  29.  
  30. <title>Untitled Document</title>
  31. </head>
  32.  
  33. <!-- The key above accesses the News Builder App found at https://dev.twitter.com/apps. I have added my key and created a twitterbox. This box will access your twitter account and post the message to the site.-->
  34.  
  35.     <div id="tweetbox"></div>
  36.     <script type="text/javascript">
  37.  
  38.       twttr.anywhere(function (T) {
  39.  
  40.         T("#tweetbox").tweetBox({
  41.             'defaultContent' : "#newsbuilder ",
  42.             'label': "What's happening in your location?",
  43.  
  44.         });
  45.  
  46.       });
  47.  
  48.     </script>
  49.  
  50.     <div id="position"> </div>
  51. <body>
  52.  Welcome to News Builder. The purpose of this app is to crowdsource news.
  53. </body>
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement