Skip to content

Commit

Permalink
api files added
Browse files Browse the repository at this point in the history
  • Loading branch information
Stardog committed Oct 19, 2017
1 parent 7239ae7 commit 92ff0ad
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/Facebook/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="fb-share-button" data-href="<?=$url?>" data-layout="button"
data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?=$urlEncoded?>&amp;src=sdkpreparse">Share</a>
</div>
5 changes: 5 additions & 0 deletions api/Facebook/meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<meta property="og:url" content="<?=$urlTitle?>" />
<meta property="og:type" content="website" />
<meta property="og:title" content="<?=$title?>" />
<meta property="og:description" content="<?=$strippedSummary?>" />
<meta property="og:image" content="<?=$leadImage?>" />
11 changes: 11 additions & 0 deletions api/Facebook/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(function (d, s, id) {
let js
const fjs = d.getElementsByTagName(s)[0]
if (d.getElementById(id)) {
return
}
js = d.createElement(s)
js.id = id
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.10"
fjs.parentNode.insertBefore(js, fjs)
}(document, 'script', 'facebook-jssdk'))
1 change: 1 addition & 0 deletions api/Twitter/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="https://twitter.com/intent/tweet?text=<?=$summary?>&amp;url=<?=$url?>&amp;hashtags=<?=$tags?>" target="_index"><i class="fa fa-twitter-square"></i></a>
7 changes: 7 additions & 0 deletions api/Twitter/meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<meta name="twitter:card" content="summary" />
<?php if (isset($twitterUsername)):?>
<meta name="twitter:site" content="@<?=$twitterUsername?>" />
<?php endif;?>
<meta name="twitter:title" content="<?=$title?>" />
<meta name="twitter:description" content="<?=$strippedSummary?>" />
<meta name="twitter:image" content="<?=$leadImage?>" />

0 comments on commit 92ff0ad

Please sign in to comment.