A simple news bar showing messages from Twitter - php

I tried to read Twitter API but I'm a newbie and I found it really difficult. What I'd like to acheive is "simple": a news bar to add on my site showing messages I post on my Twitter account, with the date I posted them, like: "08/26 Text | 08/25 Text" and so on. The default ones are too big and with too many informations, I just need a very simple text-only one. Can someone please help?

Something simple like this can probably be done more easily by using the users timeline feed, such as http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=username
I have a super simple example that uses the following and displays it using an AJAX news-scroller type effect over on GitHub. Feel free to use it and modify it as you see fit.

I think you may be looking for this effect
http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html
You also might want to check this simple to integrate Twitter jQuery library
http://tweet.seaofclouds.com/
. . . let me know if you need more help to get started

Related

New Instagram API how to pull images from other users then mine

As many of you might know Instagram changed their API and now it dont really look like it's possible to pull images other then my own.
When trying to make a new submission under the following category "I want to display hashtag content and public content on my website." i get the following
Error:
This use case is not supported. We do not approve the public_content permission for one-off projects such as displaying hashtag based content on your website. As alternative solution, you can show your own Instagram content, or find a company that offers this type of service (content discover, moderation, and display).
Have anyone found a way around this? if then please tell me!
Instagrams new policy stops getting images from hashtags.. But you can look at this :)

Database+Tooltip like wowhead

I´m searching a solution for this:
I want to have a series of pages where the information is provided on a single page like you see it here: http://www.wowhead.com/quest=12141
I want to have the information, which is on the page I've made, in a tooltip. Wowhead does it like this: http://www.wowhead.com/tooltips
I've tried the following:
I've made a MySQL database with my information in it and I'm able to print them out on the site.
Here is my problem. How do I get the informations inside of a tooltip. I can print them out with "php echo", but this would be a bit too complicated for general users to click on and wait for a page load to see them.
Summary: I need an easy solution to print out the information on a web site inside of a tooltip.
I hope you have any tips for me...
You can print all the content at once and show the tooltips using js without ajax requests.
I might misunderstood you and if yes - you should take some ajax tutorial

AddThis - Posting a variable score to Facebook and Twitter

Is it possible to have facebook and twitter "AddThis" links pull a user's score from a game?
Im developing a simple HTML5 "quiz". There is a score counter set up that I would like to be able to echo to the Twitter and Facebook share options, but I cant seem to make this work and im not sure if it's even possible...
The counter is handled through JS and displays dynamically in "#score":
<div id="score-counter"><span id="score"></span<span>/20</span></div>
I would like to be able to share something like "I got '__'/20 on this game, can you beat me?"
Looked through a ton of documentation but still can't seem to figure it out... Can anyone advise how to go about accomplishing this?
Since the open graph is essentially a page scraper, you can't dynamically generate meta tags via javascript. Essentially, this answer is probably the right one which will ultimately lead you to this question/answer.
You would basically need to create a separate share url where you'd pass in query parameters for the page to read in order to dynamically spit out the correct meta tags for the open graph to see.

Get restaurant reviews from other review sites

I am building a restaurant review site using php. I wanted to know how to show reviews from other reviews sites. For example check this link to see how google is picking up reviews from other sites. When clicked on, it takes you to their review site.
Any help will be appreciated. Thanks
First, make a list of the sites that you want to pull reviews from. Second, read through those sites and see if they have a developer section and if they expose a public API. If they do, look around to see if they have any client libraries for php which you can use to access their API from your php site. If they do have an API but there are no client libraries available, contribute to the community by creating a client library and sharing it as open source. :)
Also, it may be possible that they have an RSS feed of their reviews that you can consume easily of your site, so check that out too.
You will probably find the other sites have partnered with Google for this, however I would be using cURL to get the information you want.
I would suggest you start here with cURL, then have a look here to extract the portion you're looking for.
Edit: the section of the second link that is relevant is
preg_match_all("/<div>.+<\/div>/", $page, $matches);
print_r($matches);
What this is doing is getting the content you're looking for and then displaying it, you will probably need to define the unique elements with the content you want however, this could mean a separate rule for each website.
I hope this helps for you.
I think google find News, Blog , Reviews and something like that by site map what web administrators introduce to google as sitemap.xml .
To do this you must get page content what you want to fetch it's reviews ( By CURL or something like that to get remote file ) and fetch reviews by regular expression of HTML

multifriend selector in php

I'm trying to make a Facebook application that utilises the multi-friend-selector to let someone answer a question. (eg: why do you think is the most awesome? you get multi friend selector below, choose someone and click post to his wall).
I've the post to wall part working fine using PHP. Right now though the friend to be asked a question is picked randomly.
Now the question. Is there a way to use PHP to render a multi-friend-selector or do i HAVE to go back and do this whole thing using Javascript?
The multi-friend-selector is under Facebook's control and you cannot use for anything other than sending invitations. So unfortunately you'd have to use your own. Fortunately though, someone else already had this problem and wrote one for you: Facebook – Friends selection custom component. Note that it does use some JavaScript.

Categories