Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Adding Link #43

Open
paoloramos opened this issue May 25, 2015 · 14 comments
Open

Error Adding Link #43

paoloramos opened this issue May 25, 2015 · 14 comments

Comments

@paoloramos
Copy link

Hi,

I'm getting the "error adding link" error when I use the API to add a new bookmark. However, I do not get an explanation on what the actual error is.

Help!

Thanks.

@peoplemerge
Copy link
Contributor

Can you provide an example call you're making to the api with curl?

@paoloramos
Copy link
Author

Here's a sample:

   $params = array(
        'url'           => 'http://google.com',
        'description'   => 'Desc',
        'tags'          => 'tag1,tag2',
        'extended'      => 'Extended Content',
        'shared'        => "yes",
    );

    $params_encoded = http_build_query($params);
    $access_token = 'someaccesstoken';
    $header[] = "Authorization: Bearer {$access_token}";

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, "https://api.del.icio.us/v1/posts/add?".$params_encoded);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0');
    curl_setopt($ch, CURLOPT_REFERER, 'http://delicious.com');
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

    curl_exec($ch);

The response is always:

    <?xml version="1.0" encoding="UTF-8"?><result code="error adding link"/>

@paoloramos
Copy link
Author

And here's a twist: I get that error and sometimes my bookmark gets added into my account!!!

@paoloramos
Copy link
Author

@peoplemerge: Hi, any updates? :)

@azimut
Copy link

azimut commented Jun 13, 2015

Same here. I am using a slightly less sophisticated wget, although I set the UA, and I get the same behaviour.

@ghost
Copy link

ghost commented Jun 26, 2015

After 1 month this error still exist. Any news from Delicious team?

@peoplemerge
Copy link
Contributor

Hey guys, sorry for the slow response.
@azimut can you post the wget? It's a lot easier for me to duplicate wget than php code.

@azimut
Copy link

azimut commented Jun 26, 2015

Thanks for the reply @peoplemerge

Command:

wget --user-agent=****** --http-user=***** --http-passwd=**** -O result.html 'https://api.del.icio.us/v1/posts/add?url=http://imgur.com/gallery/*****&description=*****&extended=****'

result.html

<?xml version="1.0" encoding="UTF-8"?><result code="error adding link"/>

@peoplemerge
Copy link
Contributor

Thanks. I'll check it out now.

@peoplemerge
Copy link
Contributor

OK I was able to make limited progress. The problem is on our side (you knew that).

It's related to a component that's in the process of being revamped. When users save a link, we have a job that retrieves the full text of the link in order to suggest link title, key image, and some other key metainformation. I'm not sure, but Delicious probably does not recommend tags that way.

That job has been off for at least a few weeks as the component revamp has continued. After dissecting a lot of code, discovered this, and by flipping the switch on link retrieval, I was able to get the result to no longer say "error adding link".

Unfortunately, we had it off for a reason. Now link saving can take 60 sec.

Think you guys can give us a bit more time to complete the refactor? For the next few days, please report any changes to the behavior here.

@peoplemerge
Copy link
Contributor

OK turning it back off. 30-60s links save times would be a dealbreaker. Will check again next week

@lukasztaras
Copy link

Problem still persists. We need to make 2 submissions. First one will say 'error adding link' - even though link/post was successfully published, second will say 'item already exists', and that's how we can retrieve status so far .....

@ghost
Copy link

ghost commented Aug 6, 2015

Any news?

@sumkincpp
Copy link

Any updates on this? Looks very horrible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants