Facebook Component - Setting oAuthAccessToken by a header

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Facebook Component - Setting oAuthAccessToken by a header

Javier López
Hello,

my question is really simple, is it possible to set the 'oAuthAccessToken' on the endpoint using a header or not. I have the following code,

<code>
from("direct:test")
      .setHeader("CamelFacebook.oAuthAccessToken", constant("my-access-token"))
      .to("facebook://postVideo?oAuthAppId=appId&oAuthAppSecret=appSecret&inBody=source")
</code>

but I get the following error
{"error":{"message":"A user access token is required to request this resource.","type":"OAuthException","code":102,"fbtrace_id":"EwHNyUxnbTy"}}

Thanks,
Javi