How to skip installation page for a Github app if its already installed in the account - github

I am working on a application that uses Github API to fetch appropriate statistics data about users and their repositories and show them to the end user.
I interacted a Github App right now to maintain authentication to get private user repository data.
The current flow to get the authentication is User clicks Login button on my front end page, it takes them to my github app installation page and once the installation is done it takes back to my front end with the required query parameters. I am able to get the user token and access data. My issue is when the token is expired or a existing user tries to login again, they are stuck in the installation page and will need to re click the save button again to continue with the flow.
What can I do something to make sure if the app is already installed then skip the installation window and automatically proceed to the next step. I am aware I might be missing over something simple here, but I am unable to find a solution for this.
I saw that installation_id also gets returned along with the code in callback parameters after each Github app installation. I however haven't found much on what to do with the installation_id. Is that something that would be useful for my case ?
Same question on Github Community. Asking here for more coverage.

Related

Making a flutter app that gives push-notification whenever new notice is posted on university homepage

I am creating a Flutter app that gives push-notification whenever a new notice is posted on my university's website. The university's web page needs login(the web page allows information only to university members). Currently, I have almost finished the front-end part(with dart language) for the app, and to move on, I thought I needed to enable login function first, in order to access the website information. So, I have been googling with keywords something like 'Flutter app login to web'. However, I could only find the answers for 'how to make [web app] with Flutter'. I wanted to implement login with the current front-end state because I have almost completed the front-end rather than making a 'web app' from the beginning. I don't know if searched wrong, but I could not find how to make login on the app, and how to give a push-notification whenever a new announcement is posted on the university's web page. Could anyone tell me the big picture of how I should move on to finish my app project? Would it be better if I begin my project with a 'web app' from the beginning, or is there a way to implement login to the web from my current front-end and implement a push-notification?
I am thinking to make an app that the user logs in to the app with the user's webpage account(once the user logs in after installation then the app logins automatically whenever the app is executed) and the user could register specific keyword to receive push-notification(when the new announcement posted on the website contains that keyword). With this function, the user would not need to type id, password to login to the website from a browser every time just to check if the specific notice(that the user wanted) is posted. So basically this app simply eliminates the process of logging in to the website and checking manually for specific posts.
To conclude, I want to know two things.
How to implement login to the website from the app (and automatic authentication)
How to implement push-notification for the post that contains the keyword user has registered.
Sorry for my awkward English and long question. I wrote my best to make my question understandable. I would be so much thankful if anyone could tell me how should I implement to finish my app project.

Error when generating access token for Facebook messaging app

Despite googling and asking around I cannot find an answer to hat I am doing wrong.
I have a Facebook account and a Facebook developer account.
I created a page with my Facebook account
I log into FB developer page and create an app.
I give it a name and email and verify I am not a robot. I have a app id.
I go to dashboard and note I am in development mode.
I add a product - messenger to add te FB messaging to my page where I'll have my chat bot app.
To generate an Access Token I select the page I created from the drop down.
In the tutorial I am following an Access Token appears in the right had input.
But I get the following error
'lease edit permissions to grant the app pages_messaging in order to generate an access token.'
Can anyone tell me why and / or how to solve this issue.
Please note when I click edit permissions I see a prompt to get my permission changes reviewed by Facebook , but I should not need to do that as my app is in develop mode and will not be available to general FB users, as I understand it.
Here is a screen shot of what I see after clicking edit permissions
Thanks for your time . Much appreciated.
My apologies , I was confused when I saw the login permissions and thought I'd have to request fB to review my app , while it was still in deveopment mode. In fact you can follow the instructions below. Although I have no idea why iy just doesn't fill in the Access Token as it used to , the additional step seems pretty redundant and confusing (IMHO).
The process is simple however, just click on Edit Permissions > Select the ChatMiester page (deselect all others) > Make sure the checkbox is enabled and hit next and complete. This should generate the PAT. Having said this, I could not replicate this at my end, but it should work easily.

Webpage is not Available - Facebook Login Integration

I want to integrate facebook api to help in the registration process in my website. It was working fine before - the standard fb login button appears, the pop-up window to login to fb was working, some of the user data are obtained. However after several trials with me modifying the code as the feature isnt fully integrated yet in my site, whenever I press the login button what replaces the fb login page is "This webpage is not available." I already retracted the modifications I made to the point that it was back to the version wherein it was working before. I also created another app and replaced the app id and secret key, still it displays the same message. I do not know what is wrong. Please help.
Update:
I uploaded the project files to another hosting site and it works! Could it be that the previous domain is now blocked?
Please read the other posts, dude... we're all waiting for the FB to fix the issue...

Frictionless Authentication When Possible

I have a website that's working with Facebook Connect (or Facebook for Websites as I think it's called now). When a user first comes to the site he's able ot browse around and do some simple things without any integration with Facebook. If he wants to perform some advanced operations, we need him logged into Facebook and to authorize our app to grab some very basic information about him. We're trying to be good corporate citizens by letting him get a taste of the site without forcing him to be logged in and authorize.
To do this, we have a Login button that he needs to push before performing advanced functions. When it's pushed we call https://www.facebook.com/dialog/oauth, etc. to get things set up.
This system works fine except for one thing. IF he is already logged into Facebook AND IF he has already authorized our app, he should just be frictionlessly logged in when he goes to the webapp. But, I can't see how to do this.
Sure, I can call https://www.facebook.com/dialog/oauth when he starts the webapp, and if the conditions are right, things work great. But if the conditions aren't right, then he's presented with a bunch of things to do that I don't want to task him with just yet.
Surely there's a way around this. How can I frictionlessly allow my users to authenticate through Facebook with the stipulation that if any of the conditions are wrong, just abort the whole process without showing the user anything?
Before you display a login button for the user, call FB.getLoginStatus() to see if they're already logged in or not.

Displaying MY public wall using AS3 without user login

I've been trying to get this to work for a while, but I've apparently missed something.
All I want is to have the latest 3 or so posts from my clients Facebook page to populate and animate in a screensaver that I am building using Flash (AS3).
So far, every time I try to bring anything in, it requires a complete oAuth login and account link, but it's only a one way exchange (read-only, absolutely no writing, posting or even linking, since it's a screensaver) I'm not even sure the client wants pictures or anything.
I am currently trying to use the facebook-actionscript-api, but there isn't an option for the "App Login" type of Authentication that would solve most of my problems.
I'm at wits end and about to have to tell my client it can't be done. At least they'll always have twitter...
I don't think it is possible to get facebook feeds without an accesstoken (even if they are public). So I guess you need to define an app within Facebook and add login stuff to your app so users can give permission to your app for basic access.
Maybe this article offers some help: http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt1.html