Using twitter area search on a website with javascript - javascript

I am struggling to find adequate documentation on using the twitter API to create a twitter side-bar on a website. I want the user to enter their suburb and the twitter feed should show tweets about the area.
Im not sure whether the embedded twitter widget can be used dynamically or whether the API is the correct way to address this
Any help or advice in the right direction would be appreciated.

The embedded twitter widget can not be modified as far as I could tell, so the API is the way to go. This would be a good page to visit as it gives you an overview of how to search and gives examples of searching based on location. You also need to find a way to authenticate but that is fairly straight forward (look here).

Related

Search box to search another site

I've been tasked to replicate the search on http://www.hefce.ac.uk/postcode/
in one of our sites and wondered if it's possible to do this by having a search box in our site and every time a user clicks it will pull the results from the HEFCE site and display on ours, or to simply redirect to the HEFCE site with results?
Many thanks!
Well, the easiest thing you can do is just use Google CSE and embed it in your site. It's an easy tool where you can just insert the path of the HEFCE site, and it creates the search engine you need.

Using google analytics API - The 'Getting Started' tutorial

So I'm all new to using Google API's, so bear with me :)
I've started with the tutorial for getting started with google embed analytics API, at this link: https://developers.google.com/analytics/devguides/reporting/embed/v1/getting-started
Just for notice, I'm working in PHP.
By following the tutorial, I've made it possible to sign in to the google account, and my page displays the logged in google account, and displays 3 dropdown menus, 1 for 'account', 1 for 'property' and 1 for 'view'.
Now when I look at the tutorial site, you have the option to select entities from these drop downs, and furthermore theres a graph displayed below.
Image from tutorial site: https://developers.google.com/analytics/images/embed-api-screenshot.png
However, In my case, I have my logged in account displayed, but my 3 drop down menus are empty, meaning I cant select anything(In the tutorial a 'store' is selected), and furthermore, I have no graph/chart displayed below.
My app looks like this:
I'm guessing that I need to set these things up in my google dashboard somehow, but I'm not sure as to how I should go about this? If anyone knows what I'm doing wrong, it would be greatly appreciated! :)
Eike was completely correct - I needed to setup a GA account, and register a website. GA had some info that I followed, which included putting a certain script on my website, to allow tracking of my site.
I Now have a working implementation, so thanks to Eike! :)

Social media functionality on website

Im totally new to integrating social media with a website so this is a bit of a scattershot question. There is no doubt questions on here answering this already but as im not sure what im looking for yet, im not sure how to find them.
Okay so my company wants to promote their twitter and facebook profiles as customer service avenues, so users will ask questions on there rather than calling or emailing.
Ive built quite a funky page promoting this, however the links are literally just links to the facebook and twitter pages.
Is there a method to load a window to twitter or facebook from a website link that will prompt a user to type and submit a question to be submitted the the FB/twitter feed? Or is there a way to take content from a text box on site and pass this through to FB/Twitter?
Basically just looking for something slightly cooler and more user friendly than just dumping them on the companies FB or twitter page on click.
Cheers,
Found the solution I was looking for that works for twitter, its simply passing values through a URL, details are here https://about.twitter.com/resources/buttons#mention.
For facebook, seem to be able to do this through the comments module. Seems like a lot of this can be edited through the API so a combination of both should give me what i need:
https://developers.facebook.com/docs/plugins/comments/
use this website as an idea on pushing content into tweets
http://www.sharelinkgenerator.com/
example for twitter: the href on your link would be:
https://twitter.com/home?status=your%20content%20here
if you wanted dynamic content, you would build the url using script.
same rules apply for facebook.
if you wanted to keep it within your website, maybe look into a fixed position div containing an iframe.

show contents of link

I've been searching the internet to get some information about how i can be able to detect and show what a url is about.
Facebook has a good example of what i actually want to achieve:
If you create a update on facebook and paste in a URL, facebook will detect some information about it and show a box with some text and often the right picture.
for instance, take: http://www.ebay.com/itm/Mens-Monk-Strap-Loafers-Suede-Lined-Metal-Buckle-Slip-Casual-Dress-Shoes-New-/311170422772 . then it shows the image of the shoe and headline.
Ive found other services which does this with image services and youtube, but what i need is about getting information of products most of the time, so often urls from shops. So the user pastes in a url, and i can detect what that link is about.
any ideer how this can be done ?
Is it backend code, like c# or javascript ?
Hopefully some of you can point me in the right direction. Thanks in advance!
Facebook scrapes pages for specific metadata in the back-end and uses it to generate the snippets you see, which can either be served along with the initial page load or brought in via JavaScript (front-end). From there it's a matter of using CSS and JS to style the popup to your liking.
Depending on how inter-related your site is with the content you want to display, this can be an easy task or a difficult one.

Loading and running an external webpage

I have been asking this question in different places but couldn't get a real answer.
Here is the problem:
Let say I have a web page which is going to serve like google. I mean it will use google at the bacground but foreground will be my page. It will contain a textbox and a button. So a user will come and enter a text that he wants to search and click the button to submit the query. So my webpage will transfer this search text to the google at the background and search the thing in google. It will return the results to my webpage in a different form. `
So the question is, what is the best way of implementing this and more importantly is it possible.
Many thanks.
You will have to use Google Custom Search API: https://developers.google.com/custom-search/v1/overview
You cannot use classic web crawler techniques to get the data from Google since that violates their TOS.

Categories

Resources