Pull tweet upon provided tweet URL - php

I am trying to develop a CCK module, this module basically provides a field that handles a tweet URL.
On node save, Drupal will pull this tweet's text depending on the tweet URL i submitted and display it formatted.
Does Twitter API provide any function that handles this type of requests ?
Thanks

Yes, you can get the contents of a tweet.
http://dev.twitter.com/doc/get/statuses/show/:id

Ok, i figured a way out to integrate this with CCK in Drupal
http://batayneh.me/post/how-pull-tweet-pasting-its-url-drupal-cck

Related

Posting with Wordpress API REST

I'm trying to automate posting entries to a blog every time a specific action happens on my website.
I've been looking at the Wordpress documentation but I've only seen that I can put as the structure of the post. I would be interested in creating entries with text and images. Would it be possible to do this?
The text and images would be taken from the web page.
I'm using php with Laravel and the blog is in wordpress.
You can send a POST request to the "post" endpoint to POST a new post (no pun intended) (docs).
Although the content parameter is said to be an object in the docs, you can pass a HTML string to it like <h1>Some cool event happened</h1><p>See this picture</p><img src="https://some-path-to-picture.com/picture.png">
It seems you can even add images along with your content to be hosted on your wordpress site (see this Github question)

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

Using Twitter, how can I get a list of all tweets that contain a certain URL?

I have a blog and for each article I'd like to display all tweets/retweets that contain the URL to that page. I'd also like to be able to resolve shortened URLs. Is there any easy way to do this in php5? Thanks.
Yes, call the search API method:
http://search.twitter.com/search.json?q=http://bit.ly/
Try the Marginize publisher widget: http://marginize.com/publishers
It will find all the tweets about the page and bring them back to the site

Facebook Feed (RSS using PHP)

Can someone tell me what happens when i enter a link into the Facebook Status Update Form and it loads up a mini info kinda thing of the website (I'm guessing its RSS or something?)
How do i implement this on my site using PHP?
What do i need to learn to be able to implement that?
It scrapes the page you are linking to. It doesn't have anything to do with RSS.
By looking at the HTML of the page it can get the page title for you and find all the images that can be used as a thumbnail.
Take a look at HTTP or cURL in the PHP manual for methods to get webpage content.

Facebook-WordPress comment/feedback integration

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!

Categories