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 | |
date_default_timezone_set('America/Los_Angeles'); | |
$apikey = '<your disqus secret key>'; // Your Disqus secret key from http://disqus.com/api/ | |
$forum = '<your forum shortname>'; | |
$limit = '100'; // max is 100 for this endpoint. 25 is default | |
$order = 'asc'; // asc = oldest to newest. default is desc | |
$since = '1362117600'; // 1362117600 = March 1, 2013 at Midnight | |
$accessToken = '<your admin access token>'; // Get your access token from your API application page: http://disqus.com/api/applications/ |
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
/* | |
This script will calculate the Disqus SSO payload package | |
Please see the Integrating SSO guide to find out how to configure your account first: | |
http://help.disqus.com/customer/portal/articles/236206 | |
This example uses the Jackson JSON processor: http://jackson.codehaus.org/Home | |
*/ | |
String DISQUS_SECRET_KEY = "<YOUR_SECRET_KEY>"; // Your Disqus secret key from http://disqus.com/api/applications/ | |
// User data, replace values with authenticated user data |
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
/* | |
In your code-behind file, create a new instance of the DisqusSSO class, set the API key and call the generate method. NOTE: The method is overloaded and will optionally accept an avatar URL and/or a profile URL. | |
Depends on SSO class payload generator found here: https://github.com/disqus/DISQUS-API-Recipes/blob/master/cs/sso/DisqusSSO.cs | |
*/ | |
public string Payload { get; private set; } | |
public void GetSSOPayload(bool authenticated) | |
{ |
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
<cfcomponent displayname="Comment" hint="Disqus Interface"> | |
<cfset VARIABLES.stcMemberInfo = StructNew() /> | |
<cfset VARIABLES.intUnixTimestamp = DateDiff("s", CreateDate(1970,1,1), Now()) /> | |
<cfset VARIABLES.stgPublicKey = ""> | |
<cfset VARIABLES.stgPrivateKey = ""> | |
<cfset VARIABLES.stgForumShortName = ""> | |
<cfset getMemberInfo() > |
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 | |
define('DISQUS_SECRET_KEY', '123456'); | |
define('DISQUS_PUBLIC_KEY', 'abcdef'); | |
$data = array( | |
"id" => $user["id"], | |
"username" => $user["username"], | |
"email" => $user["email"] | |
); |
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
import base64 | |
import hashlib | |
import hmac | |
import simplejson | |
import time | |
DISQUS_SECRET_KEY = '123456' | |
DISQUS_PUBLIC_KEY = 'abcdef' | |
def get_disqus_sso(user): |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json.Linq; | |
using System.Net.NetworkInformation; | |
using System.Net.Http; | |
using AdvancedREI.Net.Http.Compression; | |
using example_project.Resources; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Documents; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
using System.Windows.Media.Animation; |
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
/// <summary> | |
/// Method to post a new comment | |
/// </summary> | |
public static async Task<string> PostComment(string threadid, string message, string guestemail, string guestname) | |
{ | |
if (!NetworkInterface.GetIsNetworkAvailable()) | |
return "Error: Not connected to the internet"; | |
// Create HTTP client | |
var gziphandler = new CompressedHttpClientHandler(); |
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
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<script type="text/javascript"> | |
var disqus_shortname = 'YOUR_DISQUS_SHORTNAME'; // required: replace example with your forum shortname | |
var disqus_identifier = 'THE_DISQUS_IDENTIFIER'; | |
var disqus_url = 'THE_PAGE_URL'; | |
var disqus_public_key = 'YOUR_API_PUBLIC_KEY'; // Get one at http://disqus.com/api/applications/ | |
$(document).ready(function () { | |
var req = $.ajax({ |
OlderNewer