1

I am writing a Chrome extension that synchronizes with Opera Link, but I keep struggling with OAuth. I have tried three different OAuth libraries, but they don't work.

These libraries are:

All of them can't fetch client tokens. I have only read-only access when I use the first and insert the tokens.

"javascript oauth opera link" doesn't give results in Google.

(EDIT:) My question is: has anyone had luck in using Opera Link in pure JavaScript, or does anyone know what the problem is?

EDIT2: this doesn't work for me: application that uses OAuth and javascript. I can use it if I get 'token' and 'tokenSecret' with the Python API debugger, but only read-only. I can't for example add new bookmarks.

Community
  • 1
  • 1
ayke
  • 1,582
  • 12
  • 14

3 Answers3

1

Hey there! The other day I made an Opera extension work with the Opera Link API: https://github.com/emanchado/Javascript-OAuth-experiments

Have a look at both the extension code itself, and https://github.com/emanchado/Javascript-OAuth-experiments/blob/master/oauthtest.js (also oauthtestget.js for a GET request example).

  • Oh really thanks! I haven't got time at the moment, but I will look at it soon. It seems to be pretty easy to use... – ayke Apr 26 '11 at 19:44
  • And I just found this gem: http://my.opera.com/spadija/blog/2011/04/25/opera-link-library-preview?cid=59705952 I haven't used it or looked at the code yet, but it seems pretty nice. –  Apr 29 '11 at 10:15
1

I just put my Opera Link JavaScript library up at https://github.com/ChaosinaCan/OperaLink.js. (It's the one emanchado linked to)

I've only tested some of the bookmark functions so far, so please tell me if anything doesn't work.

Joel Spadin
  • 436
  • 3
  • 7
  • It worked. I have forked the repository and modified it a bit to get i t work on Google Chrome. Maybe you can merge that in your code? And again, thanks for the hard work you put in this piece of code! – ayke May 04 '11 at 10:56
  • Now that I see I can leave comments: I've merged your changes. I'll get to writing some proper tests once I'm finished writing an update to one of my Opera extensions. – Joel Spadin Jun 03 '11 at 21:42
0

The Opera Link API introduction article gives information and specifically a debugger python script. I might help to understand your code issues.

It would help also if you could provide a bit of code.

karlcow
  • 6,977
  • 4
  • 38
  • 72
  • I have tried the debugger python script, that one works. But I want to make it work in pure JavaScript (Python can't be executed inside chrome extensions). – ayke Apr 18 '11 at 21:05
  • hmm I see. I do not know any good Javascript OAuth lib, but I'm asking around. – karlcow Apr 19 '11 at 15:18
  • People recommends [oauth.js](http://oauth.googlecode.com/svn/code/javascript/oauth.js) that you have used it seems. – karlcow Apr 19 '11 at 16:34