I think I have the code fixed now. Yes, that’s right, it is meant to be more generic so it wont include a link back to the permalink in WordPress.
I’m now using the Bridgy Publish plugin instead of doing it this way it seems to work much more reliably if you are using WordPress.