I want to be able to get the list of Messenger contacts of a certain user through .NET.
I've seen Messenger Connect, but it's still under beta and with limited access.
Any ideas for easier alternatives? I thought it would be as easy as invoking a WCF service.
Thank you for your help.
One option is the Windows Live User Data APIs, which contains the Windows Live Contacts API. See the documentation on retrieving contacts.
Keep in mind that the API is considered deprecated, and will eventually be replaced by Messenger Connect. See this post for more information on a possible timeframe for the service being discontinued.
Try Jbuddy from Zion Software, multiprotocol support.
Related
I am currently seeking for a REST API for Skype for Business/Lync that will allow out team access information on various calls for our company made throughout the day(since they talk to customers), such as call duration, from, to, etc. that we can display in a repeater in our web page.
We would like to store this information if possible. I have found that perhaps Unified Communications Web API(UCWA) might be the best route to take, but have found nothing relating to a call history/log.
Would this be the correct first step in trying to achieve my goal using a REST API to access our company's Skype for Business/Lync call information?
Thank you.
There is currently no way to get this information through the UCWA API. (or any other Skype API atm)
One option is to use the Call detail recording (CDR) database instead.
The other option is to use the Skype for Business SDN SDK but it wouldbe way more involved. I would assume the CDR would be easier for you to use as it's just database access.
Scope: I am developing a mobile application using Xamarin (C#) to target both Android and iPhone (initially Android). The application logic is separated out in to a PCL (C#) where possible to ensure maximum code reuse. The application integrates with the YouTube Data API v3 for the purpose of rating retrieved videos and allowing subscription to a channel.
Background: As per the documentation (http://developer.android.com/google/play-services/auth.html) I have used the suggested approach to generate an OAuth2 token for the authorised requests from Android, using the AccountManager.getToken method and this works fine and returns a token.
The next step is to make requests using this token (let's take rating a video as an example). My initial idea was to utilise the .NET client library for the YouTube Data Api (https://developers.google.com/api-client-library/dotnet/get_started). However, it seems that this would take us through the whole authorisation process once again and would likely require a web view redirect or similar. I had hoped that there may be a way to use a token which had already been retrieved to create the credential object or create the service from directly, but it doesn't appear to be the case.
The second problem I have found with the client library is that not all of the classes appear to be referenced when adding the NuGet package, namely the GoogleWebAuthorizationBroker. Additionally, as we are in a PCL we are limited with common objects such as FileStream which is utilised in the documented examples (https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth). I did try to use this library from a non-PCL project also to confirm that it wasn't just the limited references in the PCL which were responsible (for the GoogleWebAuthorizationBroker reference issue).
The other option therefore was to look at manual construction of the URL and then posting the data to make the HTTP request ourselves. This too has met with limited success similar to the question listed here: Like video with access token on YouTube using YouTube Data API v3?, which doesn't appear to be answered (suggestion to use the client api). Is this method supported, and if so are there some documented .NET examples? This method would allow me so get the token natively (on android, iphone) and then pass it to a PCL library where I could make the requests, which would be preferable.
Question: So my question is given the scope of what I am trying to achieve here what would be the approved/suggested approach. Clearly the more I can do within the PCL the better from a code reuse point of view, but right now I'd be fairly satisfied with an approach that will actually just work for Android. If anyone has any examples of successfully making authenticated requests to the YouTube Data Api (v3) from Android that would also be useful. I feel like I've trawled through a lot of the documentation to this point over a number of days but not found anything definitive to say "this is how you should do it".
Thanks in advance for any help.
Well, I wouldn't necessarily deem this the answer to my question, however, it is the approach I have taken, so thought I would report back. I have kept the OAuth2 token generation code inside the Xamarin Android project and then pass that on to a PCL which has a repository to deal with the YouTube integration. As there are only a few calls I need to make (ratings, subscriptions and comments) I have elected to manually construct the POSTs via HttpClient and proceed that way.
Perhaps not as elegant as the client library integration but gets the job done. For reference this is made a lot easier if you use the Google OAuth Playground (https://developers.google.com/oauthplayground/) first to get the token and confirm the correct JSON for your request.
If anyone has any problems with this approach then let me know and I can post specific service calls as an example.
From what I can gather, this isn't what google-api-dotnet-client is for.
If you look at the source code (https://github.com/google/google-api-dotnet-client), you can see that GoogleWebAuthorizationBroker is defined for Windows Store, WP 8 etc.
This suggests that the library is intended for .NET clients running on Microsoft operating systems, rather than Android, iOS etc.
These might be the droids you are looking for:
https://github.com/xamarin/GooglePlayServicesComponents (Android)
https://github.com/xamarin/GoogleApisForiOSComponents
They are Xamarin wrappers around the Google SDK for each platform.
This makes sense because of the way Google APIs are called on Android. Rather than rely on a client secret which one should not embed in the application, the you register the app's signature against the "installed app" client ID. The operating system then provides this key when calling google services. You won't get that functionality in a PCL :)
I am trying to post a single tweet in my Windows phone application to any twitter account. I don't want to complicate my code using external libs or APIs. If they are unavoidable, I will include. I don't need to read any tweets or need to persist my connection. Its simple, The user supplies a username, password and a tweet message and hits tweet.
The famous temple run in iPhone has exactly what I need (screenshot below).
Please guide me in C#
This is possible via XAuth. The technique is not straight forward though, your request will have to go through the Twitter API team and once they approve they will give the xAuth Access. See this other SOF answer for more details.
If you want to integrate it like in you screenshot I think you need to communicate with the API yourself.
But there is the ShareStatusTask in the Microsoft.Phone.Tasks namespace.
With that users can share your status to the social media they configured.
Also check: http://msdn.microsoft.com/en-us/library/hh394027(v=vs.92).aspx
You have two choices:
use the built-in ShareStatusTask
roll your own system.
The advantage of ShareStatusTask is that it is simple to implement and maintain.
For the user it is also a good solution as it will allow him to post the status on the social network of its choice and it avoids forcing him to authenticate again.
If you want to roll your own system, you'll have to deal with different problems:
user authentication (OAuth)
maintenance (sometimes Twitter like to change the way 3rd party apps
interact with them...)
Here is a tutorial that explains how to implement Twitter in a Windows Phone app.
Also Tweetsharp is a nice Twitter lib you can use
I'm tasked with writing a web app that will connect an internal employee and an external client while logging Case details. Our company recently switched over to Lync, so I'm a bit lost on the API for doing this.
Ideally, this would be a web app (C# & ASP.NET) so that the customer support department doesn't have to install something to every workstation. It would also mimic the behavior found in this article for sending an email to allow external users to connect.
Is UCMA required for this? We have a generic Lync account that could be used by a service to facilitate these requests if that would be more appropriate. I can also force the issue for using a desktop app if need be.
I'm just having a hell of a time finding the right API calls to make this happen on MSDN so any links to docs or tutorials would be a huge help.
Some research that doesn't quite point out what needs to be done:
UCMA: Chat with users not in AD
How do I Invite a user by email to a Lync 2010 chat session using the API?
you should take a look at this sample located at :%Program Files%Microsoft UCMA 3.0\SDK\Core\Sample Applications\Reference\ContactCenter
You'll find more details here : http://msdn.microsoft.com/en-us/library/hh285604.aspx
Hope that helped.
You should also take a look at UCWA - Microsoft's Unified Communications Web API.
Unified Communications Web API
It's a great platform for adding Lync functionality into your Web application, has an Online Demo with full source code as well.
I've been tearing my hair out for a while now about the best way to get import a users email contacts from a variety of different services, I didn't manage to find a decent .net solution and have ended up creating an interface for the open source PHP OpenInviter. However this doesn't work with Hotmail/windows live anymore, so I thought I'd do that myself with the Live Connect API (using REST and OAuth2), however the contacts only return a email_hashes which is no use as I want their actual email addresses, as I'm trying to import them into a new email address book.
Any ideas at all on how to do this or if it's possible at all! OAuth, screen scraping, whatever I'm not fussed I'd just like to get it done.
Thanks
Apparently there is no official solution to this problem (see http://social.msdn.microsoft.com/Forums/en-US/messengerconnect/thread/c5bc9b10-6080-40bf-a7ce-951a60efdfcb/#c5bc9b10-6080-40bf-a7ce-951a60efdfcb).
And according to the forums trying to do it is against terms and conditions (trying things like screen scraping).
I had this problem too. But then I found out that Google Plus is capable of pulling contacts from Hotmail accounts so I just looked at how Google Plus does it.
Just go the the "circles" page and look for the "inviter"-like functionality. There you find Hotmail, and if you look at how it works, you see that you need to add wl.emails and wl.contacts_emails to the scope when you request authorization from the Hotmail user.
As far as I can see you are already familiar with OAUTH and probably just picked wl.basic as the scope?..