Skip to content

Instantly share code, notes, and snippets.

View colmdoyle's full-sized avatar

Colm Doyle colmdoyle

View GitHub Profile
@colmdoyle
colmdoyle / video_share.php
Created December 7, 2010 12:09
Sharing a whitelisted video
<html>
<head>
<title></title>
<meta name="medium" content="video" />
<meta property="og:title" content="The Video Title" />
<meta property="og:description" content="A video" />
<meta property="og:image" content="http://cfs.flvs.daum.net/files/4/95/82/26/86134/thumb.jpg" />
<meta property="og:video" content="http://flvs.daum.net/flvPlayer.swf?vid=6x5quH4Wk6k$"/>
<meta name="video_height" content="400" />
<meta name="video_width" content="600" />
@colmdoyle
colmdoyle / visible_to_connection.php
Created December 16, 2010 15:05
Tested FBML code for using fb:visible-to-connection
<fb:visible-to-connection>
A fan
<fb:else>
<div style="position: absolute; top: 0;">
Not a fan
</div>
</fb:else>
</fb:visible-to-connection>
<html>
<head>
<title>Messing</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<style>
.profilepic{display: none;}
body{width: 100%; height: 100%;}
</style>
<?php
$to = "[email protected]";
$subject = "Contact Us";
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$headers = "From: $email";
$sent = mail($to, $subject, $message, $title, $headers) ;
$title = $_post['title'];
if($sent)
{print "Your mail was sent successfully"; }
@colmdoyle
colmdoyle / signedrequest.php
Created March 16, 2011 16:59
File to read a FB encoded Signed Request
<?php
// Title : File to read a FB encoded Signed Request
// Created By : Colm Doyle
// Created on : February 15, 2011
include('config.php');
function parse_signed_request($signed_request, $secret) {
list($encoded_sig, $payload) = explode('.', $signed_request, 2);
@colmdoyle
colmdoyle / videoembed.html
Created April 3, 2011 18:17
Code to demonstrate Embedding on Facebook
<html>
<head>
<title>Hello World</title>
<meta property="og:title" content="An awesome clip!"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://colmd.fbdublin.com/socialPlugins/videoshare2.php"/>
<meta property="og:image" content="http://colmd.fbdublin.com/socialPlugins/BugsLifeWallpaper800.jpg"/>
<meta property="og:site_name" content="FBDublin"/>
<meta property="fb:admins" content="260300016"/>
http://www.facebook.com/dialog/feed?
app_id=180157518663220&
link=http://bugs.fbdublin.com&
picture=http://colmd.fbdublin.com/socialPlugins/BugsLifeWallpaper800.jpg&
name=Facebook%20Dialogs&
caption=Reference%20Documentation&
description=Dialogs%20provide%20a%20simple,%20consistent%20interface%20for%20applications%20to%20interact%20with%20users.&
message=Facebook%20Dialogs%20are%20so%20easy!&
redirect_uri=http://bugs.fbdublin.com&
source=http://colmd.fbdublin.com/socialPlugins/tangramone.swf
@colmdoyle
colmdoyle / nukeTestUsers.php
Created June 1, 2011 16:39
A script to remove all test users associated with your Facebook Platform Application
<?php
// jSON URL which should be requested
$json_url = 'https://graph.facebook.com/YOUR_APP_ID/accounts/test-users?access_token=YOUR_APP_ID|YOUR_APP_SECRET';
// Initializing curl
$ch = curl_init( $json_url );
// Configuring curl options
$options = array(
function sendRequest() {
FB.ui({
method: 'apprequests',
message: 'Check out this awesome app!'
},
function(response) {
console.log('sendRequest response: ', response);
});
}
@colmdoyle
colmdoyle / og_testing.php
Created June 22, 2012 00:42
A handy script for mass creating instances of an Facebook Open Graph Action. Useful for testing for OAuth errors.
<?php
$access_token = ''; // The access_token you'll use
$app_id = ''; // What AppId are you testing against?
$user_id = ''; // What user are you testing against?
$og_object_url = ''; // The URL of the OG Object
$og_object_type = ''; // OG Object type
$og_namespace = ''; // OG Namespace