Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6359037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:27:59+00:00 2026-05-24T23:27:59+00:00

I am trying to use Topsy for tracking some stats. I had a script

  • 0

I am trying to use Topsy for tracking some stats. I had a script that worked locally, that uses $.getJSON to get what I need from their api.

Now I have run into a problem after deploying I get origin not allowed I have tried just about everything I know to get their JSONP to interpret

the code that works locally

get_total = (trend, duration, callback) ->
  requests = []
  search_words = []
  if trend.total?
    callback(trend, trend.total)
  else
    for item in trend.search_terms
      search_words.push(item.term)
    keywords = search_words.join('+OR+')
    url = "http://otter.topsy.com/search.json?callback=test&q=#{keywords}&window=#{duration}&apikey=38A260E9D12A4908B1AF9184B691131"
    requests.push($.getJSON(url, (data) ->
        trend.total = data.response.total
    ))

    $.when.apply($, requests).then ->
      callback(trend, trend.total)

When I remove the param for &callback and add a ? I get parse errors and the json is still sent with a MIME type json rather than a script.

according to the Topsy API adding a callback is all you need to serve a script instead of json.

Topsy JSONP Refrence

Javascript (JSONP)

When an API request uses a Javascript response format, the response body will be a javascript function call that takes one parameter containing the response object. An HTTP Header Content-Type: application/javascript` will also be sent.

+-------------------------------------------------------------------------+
|   Name      |  Type    |  Description                                   |
+-------------+----------+------------------------------------------------+
|   callback  |  string  |  Javascript callback function name. (required) |
+-------------------------------------------------------------------------+
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:28:00+00:00Added an answer on May 24, 2026 at 11:28 pm

    Try this url:

    http://otter.topsy.com/search.js?callback=test&q=test&apikey=38A260E9D12A4908B1AF9184B691131

    Note, i changed it from search.json to search.js

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use svnmerge.py to merge some files. Under the hood it uses
I trying to use ImageInfo and Jython to get information from a image on
I am trying use the jQuery table sorter plugin for a table that is
I'm trying to create a script that will delete all user properties for a
Trying to use the path to the current script, and the path contains spaces
Trying to use Linq with some Entity objects to do a crafty query here.
I am trying use Thread but i have some problem (I am beginner at
Trying to use an excpetion class which could provide location reference for XML parsing,
Trying to use a guid as a resource id in a rest url but
While trying to use LINQ to SQL I encountered several problems. I have table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.