Hi folks:
I'm interested in dispalying Disqus discussion messages in a widget that uses PHP and that will show on my website.
The widget will cycle through a large amount of messages (currently a few thousand messages).
I've succeeded in using PHP to pull the discussion messages through the Disqus Version 3.0 API using PHP CURL and outputing, but I haven't
google and other online searches to find answers but there is no documenation on how to do this with the 3.0 API.
It looks like the current Disqus 3.0 API has a very limited cursor and paginator feature.
For example, I need to run a disqus cursor that can pull 100 Discussion messages at a time. If I had 2,000 total discussion
messages, I would need to call this cursor/paginator to pull 100 messages at a time and then output these 100 messages
on my PHP widget.
Ideally the Disqus cursor and paginator would work like this:
while($cursor.hasNext()){
//call disqus API cursor/paginator method that goes through the 2,000 messages in 100 blocks at a time, Disqus cursor code here...
// get discussion messages using CURL and input into an array called $hundred...
//output the array $hundred onto my website over a pre-set time duration.
for ($i = 0; $i < 100; i++)
{
doSomething($hundred[$i]);
}
}
Can someone provide Disqus API 3 code examples to do this with PHP? Is the 3.0 API library developed enough to have a decent cursor and paginator feature? Please help!
Thanks.
Peter (in Canada)