Forums

  • Home
  •  » API
  •  » problem with feed.publishTemplatizedAction ...permissions error?

#1 2007-11-19 11:53:31

ctagg
Member
Registered: 2007-11-19
Posts: 6

problem with feed.publishTemplatizedAction ...permissions error?

I'm trying to switch from feed.publishActionOfUser to feed.publishTemplatizedAction but I'm having a prob I just can't resolve.

Basically when I call feed.publishTemplatizedAction instead of getting the success XML response:

<?xml version="1.0" encoding="UTF-8"?>
<feed_publishTemplatizedAction_response xmlns="http://api.facebook.com/1.0/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd">
    1
  </feed_publishTemplatizedAction_response>

I'm getting this:

<?xml version="1.0" encoding="UTF-8"?>
  <feed_publishTemplatizedAction_response xmlns="http://api.facebook.com/1.0/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
    <feed_publishTemplatizedAction_response_elt>0</feed_publishTemplatizedAction_response_elt>
  </feed_publishTemplatizedAction_response>

In the docs it say a 0 response is a permissions error, but doesn't say what this is or how to fix it (nor why there should be a permission prob on publishTemplatizedAction when there isn't on publishActionOfUser). Can someone help me out?

Thanks
Chris

Offline

 

#2 2007-11-19 12:06:57

anatolyl
Member
From: Israel
Registered: 2007-10-16
Posts: 4249
Website

Re: problem with feed.publishTemplatizedAction ...permissions error?


Anatoly Lubarsky

Offline

 

#3 2007-11-19 12:10:09

ctagg
Member
Registered: 2007-11-19
Posts: 6

Re: problem with feed.publishTemplatizedAction ...permissions error?

Yes. No probs there. Have tried it with the most basic of params (even with none at all), and keeps coming back with the same response

Offline

 

#4 2007-11-19 12:13:05

anatolyl
Member
From: Israel
Registered: 2007-10-16
Posts: 4249
Website

Re: problem with feed.publishTemplatizedAction ...permissions error?

what response 0 or 1 ?


Anatoly Lubarsky

Offline

 

#5 2007-11-19 12:16:19

ctagg
Member
Registered: 2007-11-19
Posts: 6

Re: problem with feed.publishTemplatizedAction ...permissions error?

In the feed preview, it just does what you expect -- render the params you've given it. From my app, it always returns a 0

Offline

 

#6 2007-11-19 12:20:53

anatolyl
Member
From: Israel
Registered: 2007-10-16
Posts: 4249
Website

Re: problem with feed.publishTemplatizedAction ...permissions error?

check the code for double quotes and such or show it here


Anatoly Lubarsky

Offline

 

#7 2007-11-19 12:31:01

ctagg
Member
Registered: 2007-11-19
Posts: 6

Re: problem with feed.publishTemplatizedAction ...permissions error?

Here's what I'm submitting, although I've tried simpler versions too (have obviously replace actual session key and uid for security)

{"session_key"=>"foo123", "v"=>"1.0", "api_key"=>"d441463016804412cbd2b80138855ce0", "method"=>"facebook.feed.publishTemplatizedAction", "title_template"=>"{actor} added news on <fb:pronoun uid='{owner}' possessive='true' /> {vehicle}", "sig"=>"37a8ef42715aa07435e8084ed49efc19", "call_id"=>"1195504097.45741", "title_data"=>"{'vehicle':'Volvo Amazon 130 (two-door)','owner':'123456'}"}

Offline

 

#8 2007-11-19 12:41:03

anatolyl
Member
From: Israel
Registered: 2007-10-16
Posts: 4249
Website

Re: problem with feed.publishTemplatizedAction ...permissions error?

title_template should be max 60 characters - you have more than that


Anatoly Lubarsky

Offline

 

#9 2007-11-19 12:49:05

ctagg
Member
Registered: 2007-11-19
Posts: 6

Re: problem with feed.publishTemplatizedAction ...permissions error?

I thought it was 60 chars excluding tags. Either way, it doesn't help. Even "title_template"=>"{actor} says hello world" gives the same response

Offline

 

#10 2007-11-20 09:02:06

ctagg
Member
Registered: 2007-11-19
Posts: 6

Re: problem with feed.publishTemplatizedAction ...permissions error?

OK. My screw up. Hadn't read the API properly, and wasn't submitting actor_id with the params (as you can prob tell from the above, if you're more on the ball than I am). I assumed that actor was the user represented by the session_key.

Also, I was thrown by the permission error response -- NB if there's anyone from from FB reading this might be better to return error code 100     ("One of the parameters specified was missing or invalid"), and/or make it clear in the docs that actor_id is a required parameter.

Hope this helps some other similarly confused person in the future.
Cheers
Chris

Offline

 

#11 2007-11-20 09:44:26

anatolyl
Member
From: Israel
Registered: 2007-10-16
Posts: 4249
Website

Re: problem with feed.publishTemplatizedAction ...permissions error?

ctagg wrote:

OK. My screw up. Hadn't read the API properly, and wasn't submitting actor_id with the params (as you can prob tell from the above, if you're more on the ball than I am). I assumed that actor was the user represented by the session_key.

lol


Anatoly Lubarsky

Offline

 

#12 2007-11-21 01:59:33

alcedo
Member
Registered: 2007-11-14
Posts: 5

Re: problem with feed.publishTemplatizedAction ...permissions error?

ctagg wrote:

OK. My screw up. Hadn't read the API properly, and wasn't submitting actor_id with the params (as you can prob tell from the above, if you're more on the ball than I am). I assumed that actor was the user represented by the session_key.

Also, I was thrown by the permission error response -- NB if there's anyone from from FB reading this might be better to return error code 100     ("One of the parameters specified was missing or invalid"), and/or make it clear in the docs that actor_id is a required parameter.

Hope this helps some other similarly confused person in the future.
Cheers
Chris

glad that u managed to solve it at last smile

Offline

 
  • Home
  •  » API
  •  » problem with feed.publishTemplatizedAction ...permissions error?

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson