This file contains hidden or 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
function error(msg) { | |
// select the span with id status | |
var s = $('#status'); | |
// set the error message | |
s.html(typeof msg == 'string' ? msg : "failed"); | |
} |
This file contains hidden or 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
// select the span with id status | |
var s = $('#status'); | |
// set the error message | |
s.html(typeof msg == 'string' ? msg : "failed"); |
This file contains hidden or 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
if ( typeof msg == 'string' ) { | |
s.html(msg); | |
} else { | |
s.html("failed"); | |
} |
This file contains hidden or 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
$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 | |
) ); |
This file contains hidden or 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
<?php | |
require 'Services/Twilio.php'; | |
$sid = "aaabbbcccdddeeefffggg"; // Your Account SID from www.twilio.com/user/account | |
$token = "hhhiiijjjkkklllmmmnnnooo"; // Your Auth Token from www.twilio.com/user/account | |
$client = new Services_Twilio( $sid, $token ); | |
$message = $client->account->sms_messages->create( | |
'+44xxx', // From a valid Twilio number |
This file contains hidden or 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
POST https://graph.facebook.com/me/feed?message=this+is+a+test+message&access_token=... |
This file contains hidden or 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
{ | |
"id": "00000000_111111111111" | |
} |
This file contains hidden or 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
name=Facebook API: Posting a Status Update | |
&link=https://www.webniraj.com/2012/11/22/facebook-api-posting-a-status-update/ | |
&caption=The Facebook API lets you post status updates in the background. | |
&message=Check out my new blog post! |
This file contains hidden or 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
https://www.facebook.com/[user_id]/posts/[post_id] |