I have recently found that the Twitter API V1 is no longer working and I need to migrate to V1.1. I am getting the following message:
"The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview."
http://search.twitter.com/search.atom?q=Twitter&rpp=30
However, after reading all the documentation and realising that I need to use OAuth with this new version I cannot find any C# code to use in ASP.net as a starting point. What I am looking to do is search for a list of keywords and download all tweets for this keyword. It was working up until last month using API v1. Does anyone have any support material that shows this type of solution? The only ones I can see are downloading and displaying a user's timeline.
Thanks.
There are several open-source .NET libraries that would be great places to check out.
TweetSharp - GitHub repository
Twitterizer (no longer updated, but code is still valid) - GitHub repository
TwitterVB (no longer updated, but code is still valid) - GitHub repository
(Full disclosure: TwitterVB is the library that I wrote. I recommend you start with TweetSharp).
Related
I would like to develop a Facebook app. I am only familiar with C# and .NET Core. Will I experience any limitations since the business SDK is not available for .NET? I am not very familiar with Facebook development.
The Business SDK relies on the Graph API, which is also public.
Directly accessing the API is very, very common, the documentation is decent, and going that route is web-based, which works from any client you've got.
https://developers.facebook.com/docs/graph-api/
I have used the Facebook Csharp SDK recently to upload hour long videos. This is a process that runs every hour and uploads a video. During this development, I found there are bugs in the SDK and I fixed it and uploaded a pull request. But I am not sure if anyone maintains that branch. But you can get the uploaded code from my github here
https://github.com/hoquem1/facebook-csharp-sdk
If you want the parent branch, you can see where I forked it from.
You need to get your permission and Tokens properly. Directions are in facebook for developer page. For Facebook Graph Api, I used the v8.0. If you need some documentations here are some useful links below. Follow the breadcrumbs..
https://developers.facebook.com/
https://developers.facebook.com/docs/video-api/getting-started
This should get you started.
I'm starting a side project that will integrate heavily with Facebook. I'm going to use React in the front-end and it will talk to a REST ws made with asp.net core web api.
The idea is that in this API I will make the calls to Facebook.
Basically, I want to: login, get/post messages from Messenger, get/post comments and messages from a business page.
I googled a little and didn't find many resources or examples of how to do this integrations other than the Facebook documentation, that has a lot of stuff and I don't know very well where to look.
I also found this SDK for .NET but it looks a bit dated https://github.com/facebook-csharp-sdk/facebook-csharp-sdk and
So, my question is: Is reading the documentations entirely really the best solution?
If anyone could at least give me a hint where to go I'd be really thankful. Would it be better/easier to integrate with Facebook with other stack than c#/asp.net?
Also, if there's any other API, SDK or something already built in .NET that would help with that I'd be grateful.
Thanks in advance.
I am one of .net developers working with Facebook API more then 5 years and we have tried to use "Facebook SDK for C#". It has more issues then benefits. In result we end up with our own small Facebook API client. Basically it is just a "RestSharp" HTTP library, "Newtonsoft.Json" for serialization/deserialization and couple of generic functions where you supply Facebook API endpoint, and specify what class you expect back as generic parameter.
var accounts = client.Get<Accounts>("me/accounts");
var createResponse = client.Post<CreateResponse>("123456779/feed", postToCreate);
Facebook SDK for C# works great for standard .NET
https://hackerapp.com/net/
https://github.com/facebook-csharp-sdk/facebook-csharp-sdk
As for .NET Core I think you are out of luck at the moment. Unless you want to port it to .NET Core yourself.
Automated Customer Service bots are not uncommon in FB, but code is hard to find. I assume you had setup you App's domain and got it reviewed and approved by FB.
I tried to set a chat-bot with both, python and .NET, and I must say the python Api is much more complete, quick, and less buggy than the C# one. But, as far as I know, only the PyApi has integrated reactions (haven't tried them).
Therefore, you will need to do this manually by using the Facebook Api by sending direct GET/POST request triggered by your ASP.NET, or use some kind of inter-language platform such as IronPython to workaround the problem (which basically assembly the call, add the Key and secret, and CURL-it).
As final remark (not a very motivating one), there is documentation for post reactions, but not for message as you can see here (posts), and here (messenger).
You can perform a lot of the facebook operations on the client side using their javascript SDK.
https://developers.facebook.com/docs/javascript
In regards to getting up to speed on server side API calls from .NET you can check out the facebook graph api explorer. It can be helpful for discovery.
https://developers.facebook.com/tools/explorer/
In case someone is looking for this topic, I had the same needs myself. After not finding a Facebook SDK to use with .NET Core, I've created a new open source .NET Standard unofficial SDK for Facebook: https://github.com/developer82/FacebookCore
I have an application still in use, which uses Version 1.9 of the YouTube .Net API. It still works for older YouTube accounts but I'm porting it to Version 3 of the API to support new YouTube accounts.
Last time I looked, the application had logged over 14,000 uploads. This information was available at the original, but now deprecated, Google Dashboard. I haven't seen any statistics for over six months and have no idea how it's travelling.
The new developer's console used for Version 3 of the API does not show any data or information for my existing application.
Does anyone know where I can find the upload statistics associated with my older application which uses Version 1.9 of the YouTube API?
Not sure if I always had the wrong URL but it appears to be working perfectly now. The previous URL was missing the SSL component. 31,000 uploads!
https://code.google.com/apis/youtube/dashboard/gwt/index.html
I'm looking for a library that will allow me to use OAuth in my ASP.NET/C# applications, such that I can authenticate users using one of the following OAuth providers
Google
Yahoo!
Twitter
I've looked at various open source libraries and find that there is one issue or another with them (some don't work at all, some work against one service not not others). I've also looked at OAuthDotNet and I must admit that I find it way too complicated to figure out how to begin using it and so I've not really tried it.
So essentially I'm looking for a simple to use library that works against the above mentioned providers (at least).
Jackie I have a blog post on this
OAuth C# Library
There is a library (including source code) and a simple sample project you can download to get started with this.
I've tested it against
1. Google
2. Twitter
3. Yahoo
4. Vimeo
You don't mention the version of OAuth you'd like to support so you should know that the library supports OAuth 1.0 revision A only and not OAuth 2.0. Most site today support OAuth 1.0 revision a.
I've kept the sample project very simple intentionally, so those starting out down this path don't have to struggle trying to figure out how to use the library. The library is not "over engineered" like I believe some libraries out there are so it is fairly simple to enhance if need be. But I suggest you attempt that only after you've familiarized yourself with the OAuth protocol.
The project in fact is an open source project hosted on Google code (link in the blog post).
Note: Due to the way Yahoo! has implemented their service it is not possible (or not simple) to test against their service from your development machine.
I hope this helps.
DotNetOpenAuth is open source library that supports OpenID, OAuth and
support for your site visitors to login with their OpenIDs.
Twitter Libraries in different languages.
Google Data client libraries are written to support client applications to access APIs.
Libraries are written in different types of languages.
If you're looking to just to Twitter then I would suggest twitterizer. It's a great library with a fairly good community and support.
http://byatool.com/c/connect-your-web-app-to-twitter-using-hammock-csharp/ (Wayback archive link.)
http://hammock.codeplex.com/ (Moved to github here: https://github.com/danielcrenna/vault/tree/master/hammock)
these link might be helpful.
I have an Idea for a simple webApp that would cross-link information from Evernote to Google Calendar. I was able to find a good Evernote Quickstart project but I am now searching for something to start with to begins accessing Calendar. Please advise if you know any good resources with code samples that would show me how to do the dirty work (i mean the authetication either via OAuth/AuthSub).
From what I have read about using OAuth with Google, it seems that you have to have a registered domain - I need to be able to access the service from my laptop's development server, so I guess I must stick with AuthSub.
When I 'googled' for this topic I found many questions similar to mine, yet none of them has been answered in satisfactory way.
Thank you in advance for your help.
UPDATE: I'm starting to think that either I am missing something or nobody is using AuthSub in ASP.NET...
I've recently created a sample how to use Google OAuth in ASP.NET and Google using the Dotnet OpenAuth library:
Using Google OAuth in asp.net
I hope this sample helps :)
Dominik
UPDATE March, 2015
By April 20th, Google will no longer support this api - Therefore I needed to migrate to OIDC. See my recent article here:
OIDC lightweight library for asp.net
In order to use OAuth, you must register your domain with Google at the following page: https://www.google.com/accounts/ManageDomains. This registration will give you the credentials you need to sign your OAuth requests. However, you could still specify a different oauth_callback url in the user authorization url. So the registered domain is not related to the oauth_callback.