Twitter API - check if account is suspended - php

For one of my tools I have a database with lots of twitter accounts.
Sometimes it happens, that account which are listed in the database are suspended by twitter.
I would like to know if there is a way to check if a account is suspended.
I'm using the php twitter api library by Abraham Williams.

Perform the users lookup query with the user ids you want to check.
The ones left out of the list will be the suspended ones.
That's the way I have accomplished it so far. Not sure if there's specific methods to do such.

Related

How to Login user on teamwork without api key on teamwork.com's API using php

I am a beginner in php. I want to integrate Teamwork API on my web page. I have already checked how to call different methods of teamwork API and what will be the JSON response of them by using developer.teamwork.com.
Now, I am a bit confused that if I use my API key in the GET request as described on the api documentation then the response contains info related to my account. Actually, I want the user to login to his/her teamwork account through my web page and I will retrieve the info regarding their projects on the web page.
So, as far as I understand, I will need to ask for user's API key of his/her teamwork account to display the info on web page. But then it's not a good approach to solve the issue. Is there any other way? Is it possible that user provide their username and password to login and get the account details?
If you use your own API key, then you will get your own information, the api key is connected to the information they have about you.
The key is a certificate about who you are and that you have the right to see the information stored.
As far as i can see teamwork.com have account and billing information in their care, and i would be worried if they shared that information to anyone without special access, such as the API key.
Depending on what you do i would consider the approach you are using, (unless teamwork have some kind of solution for it), making other people share their api key with you could be considered a security breach that could expose sensitive information, in the unfortunate case where you are not able to keep it secure, or where a customer find's you unreliable and prioritize their security over the benefit of your product.

Simplest way to get data from Google Analytics?

I am building a service like Wix.com, users can build simple mutli-pages website with ease. Every website will be including in a global Google Analytics account with a unique profile, then the tracking code is to be placed in the website pages.
Now, on the website dashboard i want to show the online visitors and the total number of visists for the website for each website separatly, trying to do so i have :
Tried using GAPI (http://code.google.com/p/gapi-google-analytics-php-interface/) but due to Google Analytics major update it doesn't work anymore.
I found Google Core reporting API for Analytics, but i believe it's made for 3rd party applications that accesses GA data for their clients, meaning that the user should have a Google account and GA profile for the website, and the App just connects to the account and retrieves data. And this of course isn't the case here; i can't ask the user to create a Google account and embed the tracking code in the website HTML; else what am i here for ?
Got the picture ? I need the simplest method to do this, no fancy stuff.
PS: Minutes ago i found this: Google Analytics Query Explorer (http://ga-dev-tools.appspot.com/explorer/), it's a 3rd party app that builds custom queries for GA and gives you the link, something like that :
https://www.googleapis.com/analytics/v3/data/ga?ids= (the ID) &dimensions=ga%3AvisitCount&metrics=ga%3Avisitors&segment=gaid%3A%3A-1&start-date=2013-02-01&end-date=2013-02-23&max-results=50
Now, trying to access the URL (thinking; this is easy :) ) the respond is a request for login first :
{"error":{"errors":[{"domain":"global","reason":"required","message":"Login Required","locationType":"header","location":"Authorization"}],"code":401,"message":"Login Required"}}
Thanks in advance.
Unless you have fewer than 50 clients this plan is not going to work the way you're asking for. (There is a limit of 50 profiles per account.)
The client will have to make their own GA number and provide it to you as a setting for their website.
In order to display the customers reports on a dashboard on your site you're also going to have to get them to authorize a GA App you create for access.

Inviting app users to an app created event - is it possible?

I have a question regarding the creation of event invites by a facebook application, and the ability to invite the users who have approved that applications permissions to this event.
For example, we are a local nightclub who have an app allowing users to connect with the app to see who else is attending events etc, and keep up to date with information about the events we host. It would be ideal to be able to send an event invite to these users when we have special events or theme nights.
Currently the app has around 10,000 approved users.
Just really looking to find out if this is at all possible with the new open graph api? In particular the info provided at:
Event API Reference
How To Use the Graph API to Manage Events
There does seem to be some confusion over what these posts say can be achieved, and what actually can be achieved.. unless those that I have previously spoken to are still basing their opinions on the old rest api.
Clarification and pointers appreciated!
The HTTP POST if you use the ?users= can only handle so many IDs before the length of the url overruns. Since it's a post, you can specify the users parameter and then a comma separated list of ids for the value. Try it out here: http://developers.facebook.com/tools/explorer?method=GET&path=me

Logging in to other wesites using Facebook Account

I am developing an advertisement site in PHP, the user can only list there products by logging in using there account in the site. Also i need to have another option for users to login into the website using there Facebook account and hence advertise about their products. How can i implement? Do i need to create any application instance in FB for this? I am looking forward for valuable suggestions.
Create an app.
Look into authentication, and see which method (server-side vs. client-side) fits you.
Once you've implemented that, you can make graph api calls. https://graph.facebook.com/me gives you the user's basic details
Good luck.

Programmatic login to Google Data API

I'm building an application which will basically be an interface for my Google Finance account. Several people will use. I have just started to research on how to do this, and one thing that immidiately seems like a hurdle is Google's oAuth system, seemingly designed for the case where each user logs into his account himself.
The usual proceeding as I understand it is that from my web application, the user gets redirected to Google's page, where they enter their information, and then are sent back. I will wind up with an authorized token that I can use to pull the data that I want.
BUT, now, as my application will ALWAYS and ONLY pull data from my account no matter who is logged in to my application, I need to always be authorized and it needs to happen programmatically without the user ever knowing.
Is this possible?
If this is designed to be an interface to YOUR Google Finance account that several people will use, then OAuth is probably not the answer you're looking for.
OAuth would allow your app to pull information from your users' Google Accounts, whereas ClientLogin would allow your application to pull data from a single account.
Check the Google Finance API for more details and examples:
http://code.google.com/apis/finance/docs/2.0/developers_guide_protocol.html#ClientLogin

Categories