I'm new to the facebook c# sdk, and I'm trying to create a program that will post to a page's timeline.
I have been trying to follow this, however I'm having difficulty understanding the second code snippet since it makes use of the Request class, in asp.net. I can't find a way to translate this into WinForms.
(I did have to change the FacebookAPI to FacebookClient)
How can I achieve the same effect, of redirecting to facebook and receive the code to get an access token?
There is a specific Winforms sample for the facebook SDK available here: Facebook Sample using Facebook C# SDK with WinForms
This sample demonstrates the use of Facebook C# SDK v6 as a WinForms
sample.
Note: This sample does not necessarily demonstrate the best use but
rather features of using Facebook C# SDK on a desktop app. It is
always recommended to use asynchronous (XAsync or XTaskAsync) methods
rather then the synchronous methods. XTaskAsync methods are preferred
over XAsync methods.
If you're just posting to your own page's timeline, the easiest way is probably a PowerShell script using the New-FBPost cmdlet: http://facebookpsmodule.codeplex.com
Related
I added the Facebook C# SDK package to my project but can't find any examples. The url in the help, http://csharpsdk.org, brings up a page about homework help.
Is this package no longer current? If not, what can be used instead of this?
I'm developing a facebook canvas app and need the ability to login from code and call all the relevant functions.
I thought that the new OWIN login in an MVC app would help but I couldn't figure out how to use it to automatically login and be able to make the different graph calls.
Thanks for any help. I've been fighting with this for some time now and can't seem to make progress.
See wiki documentation at github (pages on the right side) https://github.com/facebook-csharp-sdk/facebook-csharp-sdk/wiki
This might be a very short and trivial question, but how do I get information from Xamarin.Android to Xamarin.Forms?
Basically, what I would like to do is the following:
First I retrieve a token in my Android project from the Google Play
Services.
Then I start my main application and show a login screen.
During the login I would like to forward the token to my server, so he is aware of my token and can send me messages.
Is that a good idea? How do I get my token into the Forms part of my application?
Thanks in advance!
There are multiple options for communicating between Xamarin.Forms and the individual platform specific projects.
You can call into Xamarin.Forms from each project rather easily by accessing the Xamarin.Forms.Application class and it's "Current" property which will give you the instance of your Xamarin.Forms application.
You can also do the reverse - call into your specific platform project by utilising the DependencyService class from your shared Xamarin.Forms code. With async/await and TaskCompletionSource this can be a good way to abstract the inherent async nature of obtaining tokens on android/ios into a single awaitable function call.
You can find more information on DependencyService here
Lastly, from what I gather, you are figuring out how to register for push notifications. It might be best to simply use the PushNotifications plugin located here.
It should help you get started. Be sure to read through the documentation. There are a bunch of steps needed to get everything working.
If you have more specific questions or get stuck somewhere, post a new question, I have integrated push notifications on both Android and iOS succesfully before and might be able to help you out.
Is there any way to download Windows updates programmatically from within a C# application? I want to manage the installation of updates from within my application.
The Windows Update API is documented here. A quick stackoverflow search has convinced me that you can indeed use COM from C# so this should solve your problem.
I also have some sample code, not in C#, but it may give you a head start in understanding how the interfaces can be used.
I am trying to do this goal, but I need some alternatives to got it.
I want to read a fingerprint using asp.net,silverlight, actionscript, i need get the finger and display the capture in the window.
I do it in C# with griaule biometrics SDK 2009, only can be possible using a java applet. I dont know if mix java + asp.net can be a good alternative. if yes, how can I to pass the value from asp.net to java applet?
I need some alternatives to do it.
many thanks.
Have you tried using Silverlight?
If you have it working in a regular C# app, it might be possible to get it working in the browser via Silverlight. Then you can display it in that SL app or send it to the server via a web service.
I'm trying to access the news stream to pan for certain events
I'm running into a few issues with the facebook developer toolkit.
does anyone have or can point me to an example of getting the news stream?
The Facebook Graph Toolkit is ideal for this job. Check out http://fbgraph.computerbeacon.net/tutorial/section2/ for an example.
Try using the .NET Facebook API Client instead. Follow the Getting Started using trunk instructions, and from there using Stream.Get should be fairly straightforward