Facebook-WordPress comment/feedback integration - php

Currently I have my Facebook profile automatically republish blog posts from a WordPress instance.
What I would like to be able to do, however, is to also have comments posted to either the blog of Facebook show up on the other in the appropriate location.
Is there a way to do this with the Facebook API?

There's a bunch of facebook-connect enabled WordPress plugins that might help you achieve this.
Here's a couple:
Sociable Facebook Connect
WP-Facebook-Connect

yoavf answer is good. A list including those plugins is maintained in Facebook's wiki:
http://wiki.developers.facebook.com/index.php/Facebook_Connect_Plugin_Directory
http://dentedreality.com.au/2008/12/implementing-facebook-connect-on-wordpress-in-reality has a novel approach that isn't on that list.

you need to go to the source of the blog, figure out how the comment form is posted (POST or GET) then you can use mock ajax documentation here. then inside the facebook app, you build a form similar to the one for the blog comment. make sure all the ids of the respective form elements are identical. then on your submit button you have a link like this.
<a clickrewriteid="dummy" clickrewriteform="comment_form"
clickrewriteurl="blog_form_action">Submit</a>
so dummy is the id of an element that will recieve any output.
comment_form is the id of the form that will be posted to the blog comment processor.
blog_form_action is the url in your blogs form action attribute.
if things work, the form comment_form will be posted to your blogs processor page so that the comment submitted from facebook will appear on the blog as well.
if the blog uses GET as its method, you just make sure that blog_form_action contains the query string
hope that helps!

Related

Multiple pages for custom_post_type posts

I have a custom_post_type that creates the posts for campaign_posts, they are displayed singularly on the front-end of my site with the page template single-campaign_posts.php.
Now, what I am trying to achieve is;
single-campaign_posts.php displays the post (already taken care of)
A second page that will display a frontend editor of the post (contents of this page is already taken care of
A third page that will display analytics for the post (again, the contents of this page has been taken care if)
So when a post is viewed they can click a link within single-campaign_posts.php to display either the analytics page or edit page. The pages that are linked to must be;
able to recognize that the contents of that page relate to the post
the URL slug is for example if the post was /campaigns/dummy-post would be /campaigns/dummy-post/analytics for the analytics page and /campaigns/dummy-post/edit-campaign for the edit page.
I have tried using nav tabs to do this and it works, however, I would rather have the contents on separate pages.
I hope this enough information to obtain my goals in this. I cannot see much point in adding details of the functions.phpor single-campaign_posts.php but if they are required then please let me know.
I hate seeing posts like this, but I have come up empty on searches for a solution. In its very basic form, I need three pages that all relate to the single post.
Thank you for your time and if you need more information please let me know.
I have found the solution to this now.
The solution was to use Rewrite API/add rewrite endpoint as seen Rewrite API/add rewrite endpoint
An example is posted in this question - Create Post tabs in single-{content-type}.php with Custom Field values

Generate link to clone or duplicate a post from wordpress frontend

I've found a number of plugins for wordpress that add a link to the table in the backend to clone or duplicate a post or page (Duplicate Post, Clone Post, and Post Duplicator). This is nice, but I'm building a bit of an app on wordpress where I'm using a custom post type as an entry and would like to be able to quickly copy an entry with a link from the frontend of the site (similar to how edit_post_link works but without jumping into the backend).
I'm using Gravity Forms for the create and edit functionality for entries on the frontend, but I can't quite figure out the best approach for a secure way to submit a request, execute the clone query, and the return to the same page I was on before (i.e. not jumping into the backend). Gravity Forms Post Updates plugin does something similar with a do_action call to generate a link. I've looked through this function and generally get what's happening, but I'm not sure if I need all of the extra plugin class structure.
I was hoping to find an example of a function that could create a secure url with a nonce and then another function we validate the url and execute the query and return to the previous page. Is this the right way to go or am I barking up the wrong tree? If so, any code samples or examples that might be able to help get me started?
Much appreciated!
I found this post (http://rudrastyh.com/wordpress/duplicate-post.html) and was able to figure out what I needed to. Instead of adding a filter to include the link in the backend, I instead created an action that can be called with do_action and generates the link. I also have a page and page template that is solely for executing the call and then redirecting back to the referring url.

POST API (not form post) to create a JSFiddle

I'm working on some demos where we need to generate some code dynamically for each user. We would like to POST a JSFiddle API end point to create a new fiddle programatically from our back end. However, reading the documentation, it seems that the only POST function supported is designed for forms, not APIs, and loads a page with the jsFiddle loaded.
Is there some way I can post to a jsFiddle API and get back a URL to the jsFiddle I can direct users to?
You may have already found this:
Display a Fiddle from POST

Facebook Posts and Multiple Actions

Can you post multiple actions (I want to do two) with a wall post using the Facebook Graph API? If so what is the format that should be used for the actions string. I can't get this to work for the life of me.
This piece of documentation describes the parameter as a array of objects containing the name and link. I used json to do this however I can only successfully do one action link and not two.
I think you are talking about the custom app-pecified links displayed in the wall post. No, facebook allows only 1, and tha'ts how the structure of facebook wall post is.
there is written here http://fbdevwiki.com/wiki/FB.ui#method:_.27feed.27 that only one action link allowed

Integrate facebook Like button for a specific element of my website

I have a website where i implement a wall of messages, the idea is to add to each of this wall messages a like button, where clicking on it would immediately post on the user's facebook profile page that he likes THAT SPECIFIC COMMENT.
Is this possible? I just enter this new world of facebook php developers, and as far as I have read here it always talks about adding a Like button for a specific URL. I would like to make the like button apply for the specific post within the messages wall.
I am clueless as where to start, if by the way any one could recommend a detailed tutorial on how to integrate a website to facebook in its different ways, i would really appreciate it.
EDIT:
Looking into #Kaan Soral suggestion of using open graph, I think it is important to add that I dont want each wall post that the user likes to appear in the "Likes and Interests" section of his profile... This wouldn't make sense because he would rapidly have loads of likes of separate wall posts.
Its possible, read this: http://developers.facebook.com/docs/opengraph/
You have to create a URL for every item that will be liked and on that URL there should be META tags for descriptions, image etc

Categories