Skip to content

Instantly share code, notes, and snippets.

View SecureCloud-biz's full-sized avatar

Terry DeSimone SecureCloud-biz

View GitHub Profile
{
"id": "60506094_10100168488435226",
"from": {
"name": "Niraj Shah",
"id": "60506094"
},
"picture": "http://platform.ak.fbcdn.net/www/app_full_proxy.php?app=134775570045880&v=1&size=z&cksum=70bc38ba261c36e640b74510949a4e2a&src=https%3A%2F%2Fstackexchange.com%2Fusers%2Fflair%2F557969.png",
"link": "https://www.webniraj.com/2013/05/11/facebook-api-tracking-shares-using-the-javascript-sdk/",
"name": "Facebook API: Tracking Shares using the JavaScript SDK",
"caption": "Tracking Facebook Shares on your website or application is a useful way of seeing how popular your articles are with your readers. In order to tracking Shares, you must used the Facebook JavaScript SDK.",
function fb_share() {
FB.ui( {
method: 'feed',
name: "Facebook API: Tracking Shares using the JavaScript SDK",
link: "https://www.webniraj.com/2013/05/11/facebook-api-tracking-shares-using-the-javascript-sdk/",
picture: "https://stackexchange.com/users/flair/557969.png",
caption: "Tracking Facebook Shares on your website or application is a useful way of seeing how popular your articles are with your readers. In order to tracking Shares, you must used the Facebook JavaScript SDK."
}, function( response ) {
if ( response !== null && typeof response.post_id !== 'undefined' ) {
console.log( response );
# Run everday at 2am
0 2 * * * /path/to/sql_backup.sh
#!/bin/bash
# Shell script to backup MySql database
# CONFIG - Only edit the below lines to setup the script
# ===============================
MyUSER="root" # USERNAME
MyPASS="password" # PASSWORD
MyHOST="localhost" # Hostname
<?php
protected function getCode() {
$server_info = array_merge($_GET, $_POST, $_COOKIE);
if (isset($server_info['code'])) {
if ($this->state !== null &&
isset($server_info['state']) &&
$this->state === $server_info['state']) {
<!DOCTYPE html>
<html>
<!--
Created using jsbin.com
Source can be edited via http://jsbin.com/elafon/1/edit
-->
<head>
<title>YouTube - Like Button - Comments</title>
<link href="socialYoutube.css" rel="stylesheet">
$response = $this->facebook->api( '/' . $user_id . '/notifications', 'POST', array(
'template' => 'You have received a new message.',
'href' => 'path/to/message/?id=' . $id,
'access_token' => $app_access_token
) );
function success(position) {
// variable to store the coordinates
var location = position.coords.latitude + ',' + position.coords.longitude;
// select the span with id status
var s = $('#status');
// update the status message
s.html('found you!');
$(document).ready(function() {
var text = $('#text').text();
var word_array = text.split(' ');
// blank array to store result
var word_count = {};
// lets count the words
for ( var x in word_array ) {
body {
font-family: "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;
}
#text {
display: none;
}
.tag {
display: inline-block;