Created
November 27, 2010 19:33
-
-
Save edorcutt/718197 to your computer and use it in GitHub Desktop.
Integrate the Facebook Like Button onto the LinkedIn Company web pages.
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
{ | |
meta { | |
name "LinkedIn_Like" | |
description << | |
Integrate the Facebook Like Button onto the LinkedIn Company web pages. | |
>> | |
author "Ed Orcutt" | |
logging off | |
// Facebook Application ID and Application Secret | |
key facebook { | |
"consumer_key" : "YOURKEY", | |
"consumer_secret" : "YOURSECRET" | |
} | |
} | |
dispatch { | |
domain "www.linkedin.com" | |
} | |
global { | |
css << | |
.linkedlike { | |
float: right; | |
height: 23px; | |
margin-top: 6px; | |
margin-botton: 10px; | |
} | |
>>; | |
} | |
//////////////////////////////////////// | |
// Authorize Facebook Application | |
rule facebook_app_auth is active { | |
select using ".*" setting () | |
if (not facebook:authorized()) then | |
facebook:authorize(["publish_stream","email","user_photos","read_stream", | |
"user_notes","offline_access","user_about_me","user_notes", | |
"user_photos","user_likes","user_online_presence" | |
]) | |
with opacity = 1 and | |
sticky = true; | |
fired { last; } | |
} | |
rule Plant_Facebook_Like_Button is active { | |
select when pageview "/company/([\w\-]*)" setting (companyName) | |
pre { | |
LikeButton = << | |
<span class="linkedlike"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.linkedin.com%2Fcompany%2F#{companyName}&layout=standard&show_faces=false&width=385&action=like&colorscheme=light&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:385px; height:23px;" allowTransparency="true"></iframe></span> | |
>>; | |
} | |
prepend("div#section-header", LikeButton); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment