Tutorial: accessing Facebook API using C#

  Рет қаралды 48,739

Piotr Gankiewicz

Piotr Gankiewicz

Күн бұрын

Пікірлер
@wilachamlong8644
@wilachamlong8644 4 жыл бұрын
Can we get access token dynamically by Facebook account? Base on your demo, You can do any thing on your FB account only.
@dylanwarrener5857
@dylanwarrener5857 3 жыл бұрын
So is this the same process for accessing and posting to an instagram account?
@thegoodhood
@thegoodhood 6 жыл бұрын
Hello, thank you for the good quality video. Will this work for C# winforms?
@smokz98
@smokz98 7 жыл бұрын
Hey, what if I want to do an application where the users authorize the program through a facebook app? I have seen some videos doing that but I don't know, cause I don't want that every person who want to do something have to look and search their own token and put it in the program.
@WayneBarroncffcs
@WayneBarroncffcs 7 жыл бұрын
Hey, Piotr. Thanks for the lesson, it is going to be mighty useful. Quick question. How difficult will it be to do this was a "Web Page"?
@PiotrGankiewicz
@PiotrGankiewicz 7 жыл бұрын
Hi Wayne, what exactly are you trying to achieve? Please give me more details :).
@WayneBarroncffcs
@WayneBarroncffcs 7 жыл бұрын
Hello, Piotr. OK. I have a page on FB, for our website. When a new Question is asked, I would like to have the post shared on our page. I usually do everything with .net in VB. But, if I can get it in C#, that will work as well. As the site is designed in ASP Classic. I am just going to send a call to the script during processing, and then have it take the URL and Title, and submit that to the FB page. So, that is the plan, anyway.
@PiotrGankiewicz
@PiotrGankiewicz 7 жыл бұрын
Hey, apologies for the late response. If you're using a classic ASP, it's possible that you could make use of the official Facebook SDK for C#. Otherwise, you can do it on your own, just like I did - just make use of the HttpClient to perform the HTTP request to the Facebook API. In your scenario, I'm not sure if you could get somehow notified by the FB API that e.g. new post was added on your fanpage. You will probably need to fetch the changes periodically from their API by your server, but maybe there's a better way of which I'm not aware of.
@IQBooks-pub
@IQBooks-pub 4 жыл бұрын
Any way to post message to all facebook friends via API?
@jamessathyanathan4668
@jamessathyanathan4668 3 жыл бұрын
I can get the Account ID and Account name but its not posting the message in my timeline
@TurkishiOSGaming
@TurkishiOSGaming 5 жыл бұрын
GUI freezes when public async Task GetAsync() this function working. Any thoughts? What did i do wrong?
@hieuvu9688
@hieuvu9688 4 жыл бұрын
your main thread is blocked (maybe, I think) stackoverflow.com/questions/20304258/run-async-method-on-a-background-thread
@TurkishiOSGaming
@TurkishiOSGaming 4 жыл бұрын
@@hieuvu9688 thank you for answering,
@dusanbernath1891
@dusanbernath1891 4 жыл бұрын
@@TurkishiOSGaming Hi , please does the posted solution work for you ? Would be nice to get know, I try to solve it using solution provided but having hard time with it. Probably just some minor mistake but actually I am not able to make it works... Thanks
@TurkishiOSGaming
@TurkishiOSGaming 4 жыл бұрын
@@dusanbernath1891 I really don't have it, sorry mate
@JayBlackthorne
@JayBlackthorne 6 жыл бұрын
Your url is showing an error page. You still got that source somewhere, mate?
@PiotrGankiewicz
@PiotrGankiewicz 6 жыл бұрын
Which URL?
@JayBlackthorne
@JayBlackthorne 6 жыл бұрын
Sorry, posted this comment on the wrong video.
@sociell
@sociell 7 жыл бұрын
Jaki to wzorzec? takie rozdzielenie Client Service ?
@PiotrGankiewicz
@PiotrGankiewicz 7 жыл бұрын
Tu nie ma akurat żadnego specyficznego wzorca użytego (nie do końca też wiem o co dokładnie Ci chodzi).
@sociell
@sociell 7 жыл бұрын
aha myślałem że jak do faceServis wstrzykrzniesz faceClient i korzystasz z funkcji daceclienta opakowane w metody faceServisu to wyjdzie wychodzić jakis wzorzec, ale się myliłem dzięki za odpowiedź
@PiotrGankiewicz
@PiotrGankiewicz 7 жыл бұрын
To tak naprawdę są dobre praktyki związane z dążeniem do abstrakcji w kodzie i używaniem interfejsów. Można to ew. podpiąć pod strategy pattern :).
@globalunionofpogrammers4186
@globalunionofpogrammers4186 6 жыл бұрын
How can I publish on facebook groups at once ?
@PiotrGankiewicz
@PiotrGankiewicz 6 жыл бұрын
Unfortunately I'm not aware.
@EltonNakamura
@EltonNakamura 7 жыл бұрын
hi, how can i post a image together?
@PiotrGankiewicz
@PiotrGankiewicz 6 жыл бұрын
Hi, please check the Graph API, I have never tried it on my own.
@asmitanair4977
@asmitanair4977 4 жыл бұрын
@@PiotrGankiewicz can we use it for getting page reviews ??
@andresgonzalez-mx9ns
@andresgonzalez-mx9ns 6 жыл бұрын
I want to get coments for any user. How can I do it?
@TATravels6147
@TATravels6147 4 жыл бұрын
Too much high resolution. Imposable to see code in a cell phone KZbin app.
@MasoodOfficial
@MasoodOfficial 4 жыл бұрын
we used to complain about low quality...
@mohammedmokhtar
@mohammedmokhtar 6 жыл бұрын
You're a hero...
@metamedian
@metamedian 7 жыл бұрын
Hi Piotr, can I commission you to make me a desktop app for FB sharing? I will need it for a photobooth app we're doing. Thanks.
@PiotrGankiewicz
@PiotrGankiewicz 7 жыл бұрын
Hi, I only work with .NET Core and JavaScript, thus it's not really possible to create a desktop app using C# unless you would consider something like Electron or so.
@metamedian
@metamedian 7 жыл бұрын
Hi Piotr, can you provide me the solution files for the post? I really need to make this app badly. We are trying to recreate it. Does it still work today? Facebook hasn't broken anything in it yet?
@PiotrGankiewicz
@PiotrGankiewicz 7 жыл бұрын
It still works, you can download the source code here: piotrgankiewicz.com/wp-content/uploads/2017/02/Facebook_API_NET_Core.zip
@dirk8860
@dirk8860 5 жыл бұрын
Too hard to see code
@ngthdinh94
@ngthdinh94 6 жыл бұрын
Work like a charm :) wonderful thank you so much
@dusanbernath1891
@dusanbernath1891 4 жыл бұрын
Hallo, does it still works for you ? I tried it , used newer api ( 7.0 ) and it seems does not work ... I am not sure if I now have to use some "Send dialog" solution from FB or not ... Thanks ! edit: What I want to do is publish the post on fb wall
@ngthdinh94
@ngthdinh94 4 жыл бұрын
@@dusanbernath1891 hello, yes, it still works. I think the problem is your accessToken does not have the authorizations. Try with your accesstoken in FB graph explorer first to check the endpoint. If it does not work, Try to log in your FB with Google chrome (firefox does not work), then open this url m.facebook.com/composer/ocelot/async_loader/?publisher=feed , then search accessToken EAAA, then try with FB graph explorer
@dusanbernath1891
@dusanbernath1891 4 жыл бұрын
@@ngthdinh94 Hi , thanks for answer ( am aware of the fact this is not stackover... ) well with token provided it works well and I am able to post the message (locked) on my wall , but with my generated token it does not work ( just read works) I tried to tick all the items to in order to test my access token but it shows with some it have to be verified by someone and it is not available ( individual) for comapny you have to have business account ( I am individual user of application not the company or business ) ... So not sure what to do. I also would like to get know what is the loader you provided to me , whos "service" it is ? thanks !
@ngthdinh94
@ngthdinh94 4 жыл бұрын
@@dusanbernath1891 it is provided by Facebook (first party).
@nitinbhargava123
@nitinbhargava123 7 жыл бұрын
Really helpful :)
@mikemorrison8984
@mikemorrison8984 8 жыл бұрын
thanks! nice and simple!
@PiotrGankiewicz
@PiotrGankiewicz 8 жыл бұрын
You're welcome :).
@danielholth
@danielholth 7 жыл бұрын
So powerful. Ty!
@laytonandre2005
@laytonandre2005 3 жыл бұрын
Instablaster
@dankogulsoy
@dankogulsoy 6 жыл бұрын
Awesome
@buckshotbillybong
@buckshotbillybong 4 жыл бұрын
Your a Demi-God
Facebook Login in .NET Core [.NET8]
6:26
DotNetMastery
Рет қаралды 10 М.
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Wednesday VS Enid: Who is The Best Mommy? #shorts
0:14
Troom Oki Toki
Рет қаралды 50 МЛН
How to CALL POST API in C#! - THIS EASY!
14:15
tutorialsEU - C#
Рет қаралды 83 М.
Don't Use Websockets (Until You Try This…)
6:46
Code With Ryan
Рет қаралды 327 М.
How You Can Use The Microsoft Graph API in C#
6:30
Blue Hippo
Рет қаралды 23 М.
Стыдные вопросы про Китай / вДудь
3:07:50
вДудь
Рет қаралды 2,9 МЛН
Managing your .NET app configuration like a pro
15:16
Nick Chapsas
Рет қаралды 102 М.
The TRUTH About Golang Backend Frameworks
6:31
Melkey
Рет қаралды 136 М.
Send emails for free using Gmail SMTP server from .net (c#) application
6:17
Top 6 Most Popular API Architecture Styles
4:21
ByteByteGo
Рет қаралды 989 М.
.NET Core vs .NET Framework - What's the difference?
25:26
IAmTimCorey
Рет қаралды 645 М.
How to Vim in 2023: Tips and Tricks
15:53
ThePrimeagen
Рет қаралды 444 М.
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН