PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Trying to make a form that posts to a new post on my site with {embed_URL}...

  1. Trying to make a form that posts to a new post on my site with {embed_URL}... The problem is that the {embed_URL} is embedding URL to the page submitted from, and I want it to add a link to the post being created, so I can put the URL into a facebook "like" button automatically to "Like" the post individually.

    I used the merge tag like this:

    <div class="fb-like" data-href="{embed_url}" data-send="true" data-width="250" data-show-faces="false"></div>

    Posted 12 years ago on Wednesday December 21, 2011 | Permalink
  2. The embed_url is exactly that, the URL where the form was embedded. I don't think that's what you want. You want a link to the recently created post, correct?

    The easiest way to do this is use the post ID and then create a URL with an ugly permalink based on that ID. It functions exactly like the shortened URL in WordPress and will expand to the pretty permalink based on your permalink settings. Use this instead and see how it works. Change the example.com to your website URL.

    [php]
    <div class="fb-like" data-href="http://example.com/?p={post_id}" data-send="true" data-width="250" data-show-faces="false"></div>

    You want to use the merge tag {post_id} and append that to the URL for your site. I think that will work for you.

    Posted 12 years ago on Wednesday December 21, 2011 | Permalink
  3. I added the merge tag as shown below:

    <div class="fb-like" data-href="http://http://www.wawasee.org/?p={post_id}" data-send="true" data-width="250" data-show-faces="false"></div>

    When the form is filled, this is the html that is generated:

    <div class="fb-like" data-href="http://http://www.wawasee.org/?p=" data-send="true" data-width="250" data-show-faces="false"></div>

    It just leaves the id out. I had tried this option earier, but just figured that I did it wrong..

    Posted 12 years ago on Wednesday December 21, 2011 | Permalink
  4. I can't get that to work, so in the meantime, I have the following code"

    <div class="fb-like" data-href="{Upload Drawing:3}" data-send="true" data-width="250" data-show-faces="false"></div>

    This adds a like button which likes the URL of the image that is uploaded in the form. Not ideal because if someone clicks the link on facebook, they will show up at the image and not the post.-

    I think there may be a bug in the use of the {post_id} merge tag.

    Posted 12 years ago on Wednesday December 21, 2011 | Permalink
  5. Where are you trying to use this? Within the form itself or on the form Confirmation?

    The post isn't created until the form is submitted and processed and therefore the id of the post isn't known until that happens.

    The {post_id} is not going to exist until AFTER the form is submitted. Typically it's only used in the email notifications and the form confirmation.

    Posted 12 years ago on Wednesday December 21, 2011 | Permalink