Post to FB (encoded url issue)

Hi,

I’m not sure if this is a bug or what but I have an API request which creates a Post on a Facebook page. The API is passing 3 things to graph.facebook.com : Access Token, Message, Link.

image

The Link (URL) parameter is what I’m having issues with. The Link I need to pass is one with parameters, for example: https://mySite.co.uk/id=123&type=item

If I take that Link (as it is) and use it in the post request then when you click on the Facebook post, it loads this: https://mySite.co.uk/id=123

So, I tried again, this time encoded the ampersand so it read: https://mySite.co.uk/id=123%26type=item and when I posted, the same thing happened.

What’s bizarre is that if I make the call straight from the API connector plugin screen, by clicking on the Initialize Call button with the URL as: https://mySite.co.uk/id=123%26type=item

then it works fine and the & symbol appears in the link after you’ve clicked on the post.

I’ve set this up an Action so I put my parameters into it. Is it me? or is there something going on with the way characters are passed?

image

@NigelG have you experienced this before?

Fixed my own problem! Does help if you change the right workflow action, doh :slight_smile:
For the record, %26 in a literally string works as expected, and the Encoded URL option also works.

Thanks!
Paul

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.