SlideShare a Scribd company logo
1 of 22
Linked Data &
  Semantic Web
  Technology




Development of Twitter Applications
                  Part 2. Twitter for Websites


                         Dr. Myungjin Lee
Twitter for Websites
      • Twitter Buttons
                – the Tweet Button
                – the Follow Button


      • Embedded Tweets




                                        2
Linked Data & Semantic Web Technology
Tweet Button
      • a small widget which allows users to easily share your website
        with their followers

      • User Interaction
                1.        The user clicks the Tweet Button
                2.        The user is asked to login to Twitter if they aren't already. If the user is
                          new to Twitter they can also create an account.
                3.        The Share Box appears already completed with the information
                          provided in the properties of the Tweet Button. The user can change the
                          content if they wish.
                4.        Posting of the Tweet is confirmed and the user is suggested a maximum
                          of two accounts they may wish to follow as provided in the properties of
                          the Tweet Button.
                5.        The Share Box remains open until the user presses close.

                                                                                                         3
Linked Data & Semantic Web Technology
Three ways to add the Tweet Button
      • the iFrame version
     <iframe allowtransparency="true" frameborder="0" scrolling="no“
             src="https://platform.twitter.com/widgets/tweet_button.html" style="width:130px;
             height:20px;">
     </iframe>



      • "Build your own" Tweet button version
     <style type="text/css" media="screen">
     #custom-tweet-button a {
     display: block;
     padding: 2px 5px 2px 20px;
     background: url('https://twitter.com/favicons/favicon.ico') 1px center no-repeat;
     border: 1px solid #ccc;
     }
     </style>
     <div id="custom-tweet-button">
     <a href="https://twitter.com/share?url=https%3A%2F%2Fdev.twitter.com%2Fpages%2Ftweet-button"
        target="_blank">Tweet</a>
     </div>




                                                                                                    4
Linked Data & Semantic Web Technology
To add the Tweet Button using Javascript
      • the easiest way to add the Tweet Button to your website
     <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>
     <script>
       !function(d,s,id){
         var js,fjs=d.getElementsByTagName(s)[0];
         if(!d.getElementById(id)){
           js=d.createElement(s);
           js.id=id;
           js.src="https://platform.twitter.com/widgets.js";
           fjs.parentNode.insertBefore(js,fjs);
         }
       }
       (document,"script","twitter-wjs");
     </script>




                                                                                                 5
Linked Data & Semantic Web Technology
Properties
      • for the Tweet Button which allow you to customize its behavior

                      Query String Parameter                             Description

                                          url      URL of the page to share

                                          via      Screen name of the user to attribute the Tweet to

                                          text     Default Tweet text

                                        related    Related accounts

                                         count     Count box position

                                          lang     The language for the Tweet Button

                                        counturl   URL to which your shared URL resolves

                                        hashtags   Comma separated hashtags appended to tweet text

                                          size     The size of the rendered button



                                                                                                       6
Linked Data & Semantic Web Technology
Properties

     <a href="https://twitter.com/share?url=http://li-st.com&via=IssueCollector"
                                   class="twitter-share-button" data-lang="en">Tweet</a>
     <script>
       !function(d,s,id){
         var js,fjs=d.getElementsByTagName(s)[0];
         if(!d.getElementById(id)){
           js=d.createElement(s);
           js.id=id;
           js.src="https://platform.twitter.com/widgets.js";
           fjs.parentNode.insertBefore(js,fjs);
         }
       }
       (document,"script","twitter-wjs");
     </script>




                                                                                           7
Linked Data & Semantic Web Technology
Properties which can be used by the Javascript Tweet Button

                                                             data- attribute of   rel= attribute of a
     Data Source                        Share query string                                              Default
                                                             anchor tag           link tag
     Priority                           1                    2                    3                     4

     URL to Tweet                       url                  data-url             rel="canonical"       HTTP Referrer

     via user                           via                  data-via             rel="me"
                                                                                                        Content of the <title>
     Tweet text                         text                 data-text
                                                                                                        tag
     Recommended
                                        related              data-related
     accounts
     Count box position                 count                data-count                                 horizontal

     Language                           lang                 data-lang                                  en
     URL to which your
                                        counturl             data-counturl                              the url being shared
     shared URL resolves
     Hashtags                           hashtags             data-hashtags

     Size                               size                 data-size




                                                                                                                                 8
Linked Data & Semantic Web Technology
Properties which can be used by the Javascript Tweet Button

     <a href="https://twitter.com/share?url=http://li-st.com&via=IssueCollector"
               data-url="http://kdata.kr" class="twitter-share-button" data-lang="en">Tweet</a>
     <script>
       !function(d,s,id){
         var js,fjs=d.getElementsByTagName(s)[0];
         if(!d.getElementById(id)){
           js=d.createElement(s);
           js.id=id;
           js.src="https://platform.twitter.com/widgets.js";
           fjs.parentNode.insertBefore(js,fjs);
         }
       }
       (document,"script","twitter-wjs");
     </script>




                                                                                                  9
Linked Data & Semantic Web Technology
Positioning the Count Box
      • to describe how many times the URL has been Tweeted
     <a href="https://twitter.com/share?url=http://li-st.com&via=IssueCollector"
               data-count="vertical" class="twitter-share-button" data-lang="en">Tweet</a>
     <script>
       !function(d,s,id){
         var js,fjs=d.getElementsByTagName(s)[0];
         if(!d.getElementById(id)){
           js=d.createElement(s);
           js.id=id;
           js.src="https://platform.twitter.com/widgets.js";
           fjs.parentNode.insertBefore(js,fjs);
         }
       }
       (document,"script","twitter-wjs");
     </script>




          Value for the count property     none               horizontal            vertical


                        Displays as




                                                                                               10
Linked Data & Semantic Web Technology
Button Size
      • “medium”, which is the default size, or “large”
     <a href="https://twitter.com/share?url=http://li-st.com&via=IssueCollector"
               data-size="large" class="twitter-share-button" data-lang="en">Tweet</a>
     <script>
       !function(d,s,id){
         var js,fjs=d.getElementsByTagName(s)[0];
         if(!d.getElementById(id)){
           js=d.createElement(s);
           js.id=id;
           js.src="https://platform.twitter.com/widgets.js";
           fjs.parentNode.insertBefore(js,fjs);
         }
       }
       (document,"script","twitter-wjs");
     </script>




                                                                                         11
Linked Data & Semantic Web Technology
Related Accounts
      • to suggest accounts for a user to follow once they have sent a
        Tweet using Tweet Button
      • screen names separated using a colon

     data-related="anywhere:The Javascript API,sitestreams,twitter:The official account"




                                                                                           12
Linked Data & Semantic Web Technology
Hashtag Buttons
      • a Tweet button that specifies a hashtag using twitter-
        hashtag-button
     <a href="https://twitter.com/share?via=IssueCollector&button_hashtag=LiST"
               class="twitter-hashtag-button" data-lang="en">Tweet #LiST</a>
     <script>
       !function(d,s,id){
         var js,fjs=d.getElementsByTagName(s)[0];
         if(!d.getElementById(id)){
           js=d.createElement(s);
           js.id=id;
           js.src="https://platform.twitter.com/widgets.js";
           fjs.parentNode.insertBefore(js,fjs);
         }
       }
       (document,"script","twitter-wjs");
     </script>




                                                                                  13
Linked Data & Semantic Web Technology
Tweet to Buttons
      • a Tweet button that allows you to specify a user to mention using
        twitter-mention-button
     <a href="https://twitter.com/share?screen_name=IssueCollector"
               class="twitter-mention-button" data-lang="en">Tweet to @IssueCollector</a>
     <script>
       !function(d,s,id){
         var js,fjs=d.getElementsByTagName(s)[0];
         if(!d.getElementById(id)){
           js=d.createElement(s);
           js.id=id;
           js.src="https://platform.twitter.com/widgets.js";
           fjs.parentNode.insertBefore(js,fjs);
         }
       }
       (document,"script","twitter-wjs");
     </script>




                                                                                            14
Linked Data & Semantic Web Technology
Follow Button
      • a small widget which allows users to easily follow a Twitter
        account from any webpage




                                                                       15
Linked Data & Semantic Web Technology
Add the Follow Button to your Website
      • Using an IFRAME
     <iframe allowtransparency="true" frameborder="0" scrolling="no"
             src="//platform.twitter.com/widgets/follow_button.html?screen_name=twitterapi"
             style="width:300px; height:20px;">
     </iframe>




      • Using Javascript
     <a href="https://twitter.com/twitterapi" class="twitter-follow-button“
               data-show-count="false" lang="en">Follow @twitterapi</a>
     <script>
       !function(d,s,id){
         var js,fjs=d.getElementsByTagName(s)[0];
         if(!d.getElementById(id)){
           js=d.createElement(s);
           js.id=id;
           js.src="https://platform.twitter.com/widgets.js";
           fjs.parentNode.insertBefore(js,fjs);
         }
       }
       (document,"script","twitter-wjs");
     </script>




                                                                                              16
Linked Data & Semantic Web Technology
Configure your Follow Button

                                        Javascript (link data-attribute)   Query string parameter


      User to follow                    (in the anchor URL)                screen_name


      Followers count display           data-show-count                    show_count


      Language                          data-lang                          lang


      Width                             data-width                         Not Supported


      Alignment                         data-align                         Not Supported


      Show Screen Name                  data-show-screen-name              show_screen_name


      Size                              data-size                          Not Supported




                                                                                                    17
Linked Data & Semantic Web Technology
Easiest Way to Make Button




                                        18
Linked Data & Semantic Web Technology
Embedded Tweets
      • to take any Tweet and embed it directly in to the content of your
        article or website




                                                                            19
Linked Data & Semantic Web Technology
How to Embed a Tweet on your Website
      1. Click the “More” Tweet action and select “Embed Tweet”
      2. A dialog will appear providing you with an HTML embed code.
      3. Copy and paste this directly into your article




                                                                       20
Linked Data & Semantic Web Technology
Embedded Tweets for Developers
      • Twitter supports an oEmbed endpoint.

      • To render a Tweet using oEmbed
                – Obtain an URL to or ID number of the Tweet it wants to render.
                – Make a request to the GET statuses/oembed endpoint, passing the Tweet URL
                  or ID as a query parameter.

      • GET statuses/oembed
   https://api.twitter.com/1/statuses/oembed.json?id=133640144317198338&align=center


                    { "type": "rich",
                      "author_name": "Twitter API",
                      "cache_age": "31536000000",
                      "height": null,
                      "html": "<blockquote class="twitter-tweet tw-align-center"><p>Search API will now always return
                    "real" Twitter user IDs. The with_twitter_user_id parameter is no longer necessary. An era has ended.
                    ^TS</p>&mdash; Twitter API (@twitterapi) <a
                    href="https://twitter.com/twitterapi/status/133640144317198338" data-datetime="2011-11-
                    07T20:21:07+00:00">November7, 2011</a></blockquote>n<script src="//platform.twitter.com/widgets.js"
                    charset="utf-8"></script>",
                      "author_url": "https://twitter.com/twitterapi",
                      "provider_name": "Twitter", "version": "1.0",
                      "provider_url": "http://twitter.com",
                      "url": "https://twitter.com/twitterapi/status/133640144317198338",
                      "width": 550 }
                                                                                                                          21
Linked Data & Semantic Web Technology
References
      •       https://dev.twitter.com/docs/twitter-for-websites
      •       https://dev.twitter.com/docs/tweet-button
      •       https://dev.twitter.com/docs/follow-button
      •       https://dev.twitter.com/docs/embedded-tweets
      •       https://twitter.com/about/resources/buttons




                                                                  22
Linked Data & Semantic Web Technology

More Related Content

Similar to Development of Twitter Application #2 - Twitter for Websites

Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngineikailan
 
TechSEO Boost 2021 - Rendering Strategies: Measuring the Devil’s Details in C...
TechSEO Boost 2021 - Rendering Strategies: Measuring the Devil’s Details in C...TechSEO Boost 2021 - Rendering Strategies: Measuring the Devil’s Details in C...
TechSEO Boost 2021 - Rendering Strategies: Measuring the Devil’s Details in C...Catalyst
 
HATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API StyleHATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API StyleApigee | Google Cloud
 
Development of Twitter Application #1 - Overview
Development of Twitter Application #1 - OverviewDevelopment of Twitter Application #1 - Overview
Development of Twitter Application #1 - OverviewMyungjin Lee
 
Xhtml Part2
Xhtml Part2Xhtml Part2
Xhtml Part2nleesite
 
How to govern and secure a Data Mesh?
How to govern and secure a Data Mesh?How to govern and secure a Data Mesh?
How to govern and secure a Data Mesh?confluent
 
Guide to web trends query parameters
Guide to web trends query parametersGuide to web trends query parameters
Guide to web trends query parametersShipra Malik
 
How Twitter Usage Differs Between Humans and Company Accounts
How Twitter Usage Differs Between Humans and Company AccountsHow Twitter Usage Differs Between Humans and Company Accounts
How Twitter Usage Differs Between Humans and Company AccountsAlex Ishida
 
Social Media Data Collection & Analysis
Social Media Data Collection & AnalysisSocial Media Data Collection & Analysis
Social Media Data Collection & AnalysisScott Sanders
 
Twinder: A Search Engine for Twitter Streams
Twinder: A Search Engine for Twitter Streams Twinder: A Search Engine for Twitter Streams
Twinder: A Search Engine for Twitter Streams Ke Tao
 
Lab#1 - Front End Development
Lab#1 - Front End DevelopmentLab#1 - Front End Development
Lab#1 - Front End DevelopmentWalid Ashraf
 
Social Metadata 2014 Visualizer Tool
Social Metadata 2014 Visualizer ToolSocial Metadata 2014 Visualizer Tool
Social Metadata 2014 Visualizer Toolunfunnel
 
エコーワークス【a-blogcms in KANAZAWA】
エコーワークス【a-blogcms in KANAZAWA】エコーワークス【a-blogcms in KANAZAWA】
エコーワークス【a-blogcms in KANAZAWA】Akira Nozaki
 
Guía SEO 2020: Trucos y recomendaciones para desarrolladores y webmasters
Guía SEO 2020: Trucos y recomendaciones para desarrolladores y webmastersGuía SEO 2020: Trucos y recomendaciones para desarrolladores y webmasters
Guía SEO 2020: Trucos y recomendaciones para desarrolladores y webmastersMiguel López Zuleta
 
Big Data Week 2013 Flow
Big Data Week 2013 FlowBig Data Week 2013 Flow
Big Data Week 2013 FlowVictor Anjos
 
HTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptxHTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptxwewit44414
 
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIsExternalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIsSalesforce Developers
 
Dave Kinsella's WCS Presentation
Dave Kinsella's WCS PresentationDave Kinsella's WCS Presentation
Dave Kinsella's WCS PresentationInBlackandWhite
 

Similar to Development of Twitter Application #2 - Twitter for Websites (20)

Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngine
 
TechSEO Boost 2021 - Rendering Strategies: Measuring the Devil’s Details in C...
TechSEO Boost 2021 - Rendering Strategies: Measuring the Devil’s Details in C...TechSEO Boost 2021 - Rendering Strategies: Measuring the Devil’s Details in C...
TechSEO Boost 2021 - Rendering Strategies: Measuring the Devil’s Details in C...
 
HATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API StyleHATEOAS 101 - Opinionated Introduction to a REST API Style
HATEOAS 101 - Opinionated Introduction to a REST API Style
 
Development of Twitter Application #1 - Overview
Development of Twitter Application #1 - OverviewDevelopment of Twitter Application #1 - Overview
Development of Twitter Application #1 - Overview
 
Metadata.pptx
Metadata.pptxMetadata.pptx
Metadata.pptx
 
Xhtml Part2
Xhtml Part2Xhtml Part2
Xhtml Part2
 
How to govern and secure a Data Mesh?
How to govern and secure a Data Mesh?How to govern and secure a Data Mesh?
How to govern and secure a Data Mesh?
 
Guide to web trends query parameters
Guide to web trends query parametersGuide to web trends query parameters
Guide to web trends query parameters
 
HTML5 - An introduction
HTML5 - An introductionHTML5 - An introduction
HTML5 - An introduction
 
How Twitter Usage Differs Between Humans and Company Accounts
How Twitter Usage Differs Between Humans and Company AccountsHow Twitter Usage Differs Between Humans and Company Accounts
How Twitter Usage Differs Between Humans and Company Accounts
 
Social Media Data Collection & Analysis
Social Media Data Collection & AnalysisSocial Media Data Collection & Analysis
Social Media Data Collection & Analysis
 
Twinder: A Search Engine for Twitter Streams
Twinder: A Search Engine for Twitter Streams Twinder: A Search Engine for Twitter Streams
Twinder: A Search Engine for Twitter Streams
 
Lab#1 - Front End Development
Lab#1 - Front End DevelopmentLab#1 - Front End Development
Lab#1 - Front End Development
 
Social Metadata 2014 Visualizer Tool
Social Metadata 2014 Visualizer ToolSocial Metadata 2014 Visualizer Tool
Social Metadata 2014 Visualizer Tool
 
エコーワークス【a-blogcms in KANAZAWA】
エコーワークス【a-blogcms in KANAZAWA】エコーワークス【a-blogcms in KANAZAWA】
エコーワークス【a-blogcms in KANAZAWA】
 
Guía SEO 2020: Trucos y recomendaciones para desarrolladores y webmasters
Guía SEO 2020: Trucos y recomendaciones para desarrolladores y webmastersGuía SEO 2020: Trucos y recomendaciones para desarrolladores y webmasters
Guía SEO 2020: Trucos y recomendaciones para desarrolladores y webmasters
 
Big Data Week 2013 Flow
Big Data Week 2013 FlowBig Data Week 2013 Flow
Big Data Week 2013 Flow
 
HTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptxHTML introduction for beginners Slides .pptx
HTML introduction for beginners Slides .pptx
 
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIsExternalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
Externalizing Chatter Using Heroku, Angular.js, Node.js and Chatter REST APIs
 
Dave Kinsella's WCS Presentation
Dave Kinsella's WCS PresentationDave Kinsella's WCS Presentation
Dave Kinsella's WCS Presentation
 

More from Myungjin Lee

지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)Myungjin Lee
 
JSP 프로그래밍 #05 HTML과 JSP
JSP 프로그래밍 #05 HTML과 JSPJSP 프로그래밍 #05 HTML과 JSP
JSP 프로그래밍 #05 HTML과 JSPMyungjin Lee
 
JSP 프로그래밍 #04 JSP 의 기본
JSP 프로그래밍 #04 JSP 의 기본JSP 프로그래밍 #04 JSP 의 기본
JSP 프로그래밍 #04 JSP 의 기본Myungjin Lee
 
JSP 프로그래밍 #03 서블릿
JSP 프로그래밍 #03 서블릿JSP 프로그래밍 #03 서블릿
JSP 프로그래밍 #03 서블릿Myungjin Lee
 
JSP 프로그래밍 #02 서블릿과 JSP 시작하기
JSP 프로그래밍 #02 서블릿과 JSP 시작하기JSP 프로그래밍 #02 서블릿과 JSP 시작하기
JSP 프로그래밍 #02 서블릿과 JSP 시작하기Myungjin Lee
 
JSP 프로그래밍 #01 웹 프로그래밍
JSP 프로그래밍 #01 웹 프로그래밍JSP 프로그래밍 #01 웹 프로그래밍
JSP 프로그래밍 #01 웹 프로그래밍Myungjin Lee
 
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)Myungjin Lee
 
오픈 데이터와 인공지능
오픈 데이터와 인공지능오픈 데이터와 인공지능
오픈 데이터와 인공지능Myungjin Lee
 
법령 온톨로지의 구축 및 검색
법령 온톨로지의 구축 및 검색법령 온톨로지의 구축 및 검색
법령 온톨로지의 구축 및 검색Myungjin Lee
 
도서관과 Linked Data
도서관과 Linked Data도서관과 Linked Data
도서관과 Linked DataMyungjin Lee
 
공공데이터, 현재 우리는?
공공데이터, 현재 우리는?공공데이터, 현재 우리는?
공공데이터, 현재 우리는?Myungjin Lee
 
LODAC 2017 Linked Open Data Workshop
LODAC 2017 Linked Open Data WorkshopLODAC 2017 Linked Open Data Workshop
LODAC 2017 Linked Open Data WorkshopMyungjin Lee
 
Introduction of Deep Learning
Introduction of Deep LearningIntroduction of Deep Learning
Introduction of Deep LearningMyungjin Lee
 
쉽게 이해하는 LOD
쉽게 이해하는 LOD쉽게 이해하는 LOD
쉽게 이해하는 LODMyungjin Lee
 
서울시 열린데이터 광장 문화관광 분야 LOD 서비스
서울시 열린데이터 광장 문화관광 분야 LOD 서비스서울시 열린데이터 광장 문화관광 분야 LOD 서비스
서울시 열린데이터 광장 문화관광 분야 LOD 서비스Myungjin Lee
 
LOD(Linked Open Data) Recommendations
LOD(Linked Open Data) RecommendationsLOD(Linked Open Data) Recommendations
LOD(Linked Open Data) RecommendationsMyungjin Lee
 
Linked Open Data Tutorial
Linked Open Data TutorialLinked Open Data Tutorial
Linked Open Data TutorialMyungjin Lee
 
Linked Data Usecases
Linked Data UsecasesLinked Data Usecases
Linked Data UsecasesMyungjin Lee
 
공공데이터와 Linked open data
공공데이터와 Linked open data공공데이터와 Linked open data
공공데이터와 Linked open dataMyungjin Lee
 
공공데이터와 Linked open data
공공데이터와 Linked open data공공데이터와 Linked open data
공공데이터와 Linked open dataMyungjin Lee
 

More from Myungjin Lee (20)

지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
지식그래프 개념과 활용방안 (Knowledge Graph - Introduction and Use Cases)
 
JSP 프로그래밍 #05 HTML과 JSP
JSP 프로그래밍 #05 HTML과 JSPJSP 프로그래밍 #05 HTML과 JSP
JSP 프로그래밍 #05 HTML과 JSP
 
JSP 프로그래밍 #04 JSP 의 기본
JSP 프로그래밍 #04 JSP 의 기본JSP 프로그래밍 #04 JSP 의 기본
JSP 프로그래밍 #04 JSP 의 기본
 
JSP 프로그래밍 #03 서블릿
JSP 프로그래밍 #03 서블릿JSP 프로그래밍 #03 서블릿
JSP 프로그래밍 #03 서블릿
 
JSP 프로그래밍 #02 서블릿과 JSP 시작하기
JSP 프로그래밍 #02 서블릿과 JSP 시작하기JSP 프로그래밍 #02 서블릿과 JSP 시작하기
JSP 프로그래밍 #02 서블릿과 JSP 시작하기
 
JSP 프로그래밍 #01 웹 프로그래밍
JSP 프로그래밍 #01 웹 프로그래밍JSP 프로그래밍 #01 웹 프로그래밍
JSP 프로그래밍 #01 웹 프로그래밍
 
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
관광 지식베이스와 스마트 관광 서비스 (Knowledge base and Smart Tourism)
 
오픈 데이터와 인공지능
오픈 데이터와 인공지능오픈 데이터와 인공지능
오픈 데이터와 인공지능
 
법령 온톨로지의 구축 및 검색
법령 온톨로지의 구축 및 검색법령 온톨로지의 구축 및 검색
법령 온톨로지의 구축 및 검색
 
도서관과 Linked Data
도서관과 Linked Data도서관과 Linked Data
도서관과 Linked Data
 
공공데이터, 현재 우리는?
공공데이터, 현재 우리는?공공데이터, 현재 우리는?
공공데이터, 현재 우리는?
 
LODAC 2017 Linked Open Data Workshop
LODAC 2017 Linked Open Data WorkshopLODAC 2017 Linked Open Data Workshop
LODAC 2017 Linked Open Data Workshop
 
Introduction of Deep Learning
Introduction of Deep LearningIntroduction of Deep Learning
Introduction of Deep Learning
 
쉽게 이해하는 LOD
쉽게 이해하는 LOD쉽게 이해하는 LOD
쉽게 이해하는 LOD
 
서울시 열린데이터 광장 문화관광 분야 LOD 서비스
서울시 열린데이터 광장 문화관광 분야 LOD 서비스서울시 열린데이터 광장 문화관광 분야 LOD 서비스
서울시 열린데이터 광장 문화관광 분야 LOD 서비스
 
LOD(Linked Open Data) Recommendations
LOD(Linked Open Data) RecommendationsLOD(Linked Open Data) Recommendations
LOD(Linked Open Data) Recommendations
 
Linked Open Data Tutorial
Linked Open Data TutorialLinked Open Data Tutorial
Linked Open Data Tutorial
 
Linked Data Usecases
Linked Data UsecasesLinked Data Usecases
Linked Data Usecases
 
공공데이터와 Linked open data
공공데이터와 Linked open data공공데이터와 Linked open data
공공데이터와 Linked open data
 
공공데이터와 Linked open data
공공데이터와 Linked open data공공데이터와 Linked open data
공공데이터와 Linked open data
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

Development of Twitter Application #2 - Twitter for Websites

  • 1. Linked Data & Semantic Web Technology Development of Twitter Applications Part 2. Twitter for Websites Dr. Myungjin Lee
  • 2. Twitter for Websites • Twitter Buttons – the Tweet Button – the Follow Button • Embedded Tweets 2 Linked Data & Semantic Web Technology
  • 3. Tweet Button • a small widget which allows users to easily share your website with their followers • User Interaction 1. The user clicks the Tweet Button 2. The user is asked to login to Twitter if they aren't already. If the user is new to Twitter they can also create an account. 3. The Share Box appears already completed with the information provided in the properties of the Tweet Button. The user can change the content if they wish. 4. Posting of the Tweet is confirmed and the user is suggested a maximum of two accounts they may wish to follow as provided in the properties of the Tweet Button. 5. The Share Box remains open until the user presses close. 3 Linked Data & Semantic Web Technology
  • 4. Three ways to add the Tweet Button • the iFrame version <iframe allowtransparency="true" frameborder="0" scrolling="no“ src="https://platform.twitter.com/widgets/tweet_button.html" style="width:130px; height:20px;"> </iframe> • "Build your own" Tweet button version <style type="text/css" media="screen"> #custom-tweet-button a { display: block; padding: 2px 5px 2px 20px; background: url('https://twitter.com/favicons/favicon.ico') 1px center no-repeat; border: 1px solid #ccc; } </style> <div id="custom-tweet-button"> <a href="https://twitter.com/share?url=https%3A%2F%2Fdev.twitter.com%2Fpages%2Ftweet-button" target="_blank">Tweet</a> </div> 4 Linked Data & Semantic Web Technology
  • 5. To add the Tweet Button using Javascript • the easiest way to add the Tweet Button to your website <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } } (document,"script","twitter-wjs"); </script> 5 Linked Data & Semantic Web Technology
  • 6. Properties • for the Tweet Button which allow you to customize its behavior Query String Parameter Description url URL of the page to share via Screen name of the user to attribute the Tweet to text Default Tweet text related Related accounts count Count box position lang The language for the Tweet Button counturl URL to which your shared URL resolves hashtags Comma separated hashtags appended to tweet text size The size of the rendered button 6 Linked Data & Semantic Web Technology
  • 7. Properties <a href="https://twitter.com/share?url=http://li-st.com&via=IssueCollector" class="twitter-share-button" data-lang="en">Tweet</a> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } } (document,"script","twitter-wjs"); </script> 7 Linked Data & Semantic Web Technology
  • 8. Properties which can be used by the Javascript Tweet Button data- attribute of rel= attribute of a Data Source Share query string Default anchor tag link tag Priority 1 2 3 4 URL to Tweet url data-url rel="canonical" HTTP Referrer via user via data-via rel="me" Content of the <title> Tweet text text data-text tag Recommended related data-related accounts Count box position count data-count horizontal Language lang data-lang en URL to which your counturl data-counturl the url being shared shared URL resolves Hashtags hashtags data-hashtags Size size data-size 8 Linked Data & Semantic Web Technology
  • 9. Properties which can be used by the Javascript Tweet Button <a href="https://twitter.com/share?url=http://li-st.com&via=IssueCollector" data-url="http://kdata.kr" class="twitter-share-button" data-lang="en">Tweet</a> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } } (document,"script","twitter-wjs"); </script> 9 Linked Data & Semantic Web Technology
  • 10. Positioning the Count Box • to describe how many times the URL has been Tweeted <a href="https://twitter.com/share?url=http://li-st.com&via=IssueCollector" data-count="vertical" class="twitter-share-button" data-lang="en">Tweet</a> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } } (document,"script","twitter-wjs"); </script> Value for the count property none horizontal vertical Displays as 10 Linked Data & Semantic Web Technology
  • 11. Button Size • “medium”, which is the default size, or “large” <a href="https://twitter.com/share?url=http://li-st.com&via=IssueCollector" data-size="large" class="twitter-share-button" data-lang="en">Tweet</a> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } } (document,"script","twitter-wjs"); </script> 11 Linked Data & Semantic Web Technology
  • 12. Related Accounts • to suggest accounts for a user to follow once they have sent a Tweet using Tweet Button • screen names separated using a colon data-related="anywhere:The Javascript API,sitestreams,twitter:The official account" 12 Linked Data & Semantic Web Technology
  • 13. Hashtag Buttons • a Tweet button that specifies a hashtag using twitter- hashtag-button <a href="https://twitter.com/share?via=IssueCollector&button_hashtag=LiST" class="twitter-hashtag-button" data-lang="en">Tweet #LiST</a> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } } (document,"script","twitter-wjs"); </script> 13 Linked Data & Semantic Web Technology
  • 14. Tweet to Buttons • a Tweet button that allows you to specify a user to mention using twitter-mention-button <a href="https://twitter.com/share?screen_name=IssueCollector" class="twitter-mention-button" data-lang="en">Tweet to @IssueCollector</a> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } } (document,"script","twitter-wjs"); </script> 14 Linked Data & Semantic Web Technology
  • 15. Follow Button • a small widget which allows users to easily follow a Twitter account from any webpage 15 Linked Data & Semantic Web Technology
  • 16. Add the Follow Button to your Website • Using an IFRAME <iframe allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/follow_button.html?screen_name=twitterapi" style="width:300px; height:20px;"> </iframe> • Using Javascript <a href="https://twitter.com/twitterapi" class="twitter-follow-button“ data-show-count="false" lang="en">Follow @twitterapi</a> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } } (document,"script","twitter-wjs"); </script> 16 Linked Data & Semantic Web Technology
  • 17. Configure your Follow Button Javascript (link data-attribute) Query string parameter User to follow (in the anchor URL) screen_name Followers count display data-show-count show_count Language data-lang lang Width data-width Not Supported Alignment data-align Not Supported Show Screen Name data-show-screen-name show_screen_name Size data-size Not Supported 17 Linked Data & Semantic Web Technology
  • 18. Easiest Way to Make Button 18 Linked Data & Semantic Web Technology
  • 19. Embedded Tweets • to take any Tweet and embed it directly in to the content of your article or website 19 Linked Data & Semantic Web Technology
  • 20. How to Embed a Tweet on your Website 1. Click the “More” Tweet action and select “Embed Tweet” 2. A dialog will appear providing you with an HTML embed code. 3. Copy and paste this directly into your article 20 Linked Data & Semantic Web Technology
  • 21. Embedded Tweets for Developers • Twitter supports an oEmbed endpoint. • To render a Tweet using oEmbed – Obtain an URL to or ID number of the Tweet it wants to render. – Make a request to the GET statuses/oembed endpoint, passing the Tweet URL or ID as a query parameter. • GET statuses/oembed https://api.twitter.com/1/statuses/oembed.json?id=133640144317198338&align=center { "type": "rich", "author_name": "Twitter API", "cache_age": "31536000000", "height": null, "html": "<blockquote class="twitter-tweet tw-align-center"><p>Search API will now always return "real" Twitter user IDs. The with_twitter_user_id parameter is no longer necessary. An era has ended. ^TS</p>&mdash; Twitter API (@twitterapi) <a href="https://twitter.com/twitterapi/status/133640144317198338" data-datetime="2011-11- 07T20:21:07+00:00">November7, 2011</a></blockquote>n<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>", "author_url": "https://twitter.com/twitterapi", "provider_name": "Twitter", "version": "1.0", "provider_url": "http://twitter.com", "url": "https://twitter.com/twitterapi/status/133640144317198338", "width": 550 } 21 Linked Data & Semantic Web Technology
  • 22. References • https://dev.twitter.com/docs/twitter-for-websites • https://dev.twitter.com/docs/tweet-button • https://dev.twitter.com/docs/follow-button • https://dev.twitter.com/docs/embedded-tweets • https://twitter.com/about/resources/buttons 22 Linked Data & Semantic Web Technology