Tag Info

New answers tagged

1

While this is not available I don't think SE can do much to prevent it. I don't have any easily readable code to give you code example, but the theory is following: The upload request To upload images to Stack Exchange, you must send following POST request to http://__HOST__/upload/image: fkey: we'll talk about this token later source: web/computer ...


1

The markdown code supposedly lives at the pagedown project on code.google.com. (Reference) You may also find these files to be useful: The commented, human readable version of wmd.js The commented, human readable version of full.js Personally, I find it easier to just use normal <textarea> processing followed by a call to ...


2

It would be simpler and more precise if you made users provide their ID number instead (for example, yours is 1637442 on Stack Overflow). Then you'd merely use the /users/{ids}/questions route to get the questions. If you really must have access by username, then: First do a search using the inname parameter of the /users route. It is recommended that ...


0

As @BrockAdams said, the string is compressed and need to be uncompress depending on the $request->headers. $request = drupal_http_request('https://api.stackexchange.com/2.2/users?order=desc&sort=reputation&site=stackoverflow'); if (isset($request->headers['content-encoding'])) { if ($request->headers['content-encoding'] == 'gzip') { ...


0

I think you may be interested in these 2 methods: Authentication: https://api.stackexchange.com/docs/authentication /me (user): https://api.stackexchange.com/docs/me#order=desc&sort=reputation&filter=default&site=stackoverflow&run=true You can access the user's reputation quite easily from there.


0

Yes, you can use a local environment to develop. For example, this answer contains a complete start to authenticating an HTML+javascript app. All it requires is for you to run XAMPP (or similar server) on your local machine. If you don't need authorization, you can even host your app on one of the free services. For example, this single-web-page app ...


2

Yes, calls to /access-tokens/{accessTokens} use API quota. You can see that by repeatedly running /2.2/access-tokens/XBWL0stf*YIOCl7WpJHqYA)) for example. With each call, the quota_remaining value will decrease. However, there is no reason that the token check has to use the same key as your main app. The token check and your main app would then use ...


0

Remove the protocol and it should work. On my localhost, I am testing OAuth on a random port and it works fine, while the App setting for redirect_uri is just localhost.


-1

never mind, I found the answer, http://stackapps.com/apps/oauth/


0

I was able to deduce an answer by 'reverse-engineering' (sort of) the default filter: /2.2/filters/default this gives { "items": [ { "included_fields": [ ".backoff", ".error_id", ".error_message", ".error_name", ".has_more", ".items", ".quota_max", ".quota_remaining", ...


1

When an HTTP request to show a page is sent to the Stack Exchange web site, a check is explicitly made to ensure that returned page is not loaded into an <iframe>. The response header that comes back for X-Frame-Options is SAMEORIGIN which means that only pages loaded from the same origin can be included in the <iframe>. There are good reasons ...



Top 50 recent answers are included