Facebook notifications in UC Browser

    Not so long ago, a new feature appeared in UC Browser - Facebook notification, and in this article we want to share some details with you. So, Facebook notification is a feature that allows you to receive messages and notifications from Facebook, even if your browser is closed. The user will receive push messages on the main screen of his phone and thus will not miss a single important message.

    The well-known service - Google Cloud Messaging (GCM) and OAuth protocol - were taken as the basis for the implementation of this function.


    In this diagram, we can see how the process of receiving a notification occurs:


    Step by step it looks like this:

    Login:
    1. The user logs into Facebook.
    2. Add-on “Better FB” will detect and check the status of cookies after the user logs in to FB.
    3. Add-on performs OAuth login to FB to get user_access_token. The user will have to give permission to receive information.
    4. Add-on is registered in GCM and receives registration ID (push_token).
    5. Add-on is registered in FB using push_token.
    6. The FB starts sending GCM notifications using push_token.

    Stopping notifications is as follows:
    1. The user logs out of Facebook.
    2. Add-on "Better FB" detects that cookies are not available.
    3. Add-on unregisters with GCM and cancels push_token.
    4. Add-on unregisters with FB using push_token.
    5. FB stops sending GCM notifications using the push_token

    Push Notification API

    Registration of access token:
    api.facebook.com/method/user.registerPushCallback?protocol_params= {"token": ""," App_version ":""} & access_token =


    Unregistering the access token: api.facebook.com/method/user.unregisterPushCallback?protocol_params= {"token": "”} & Access_token =

    Pause / Resume Token:
    api.facebook.com/method/user.registerPushCallback?protocol_params= {"token": ""," App_version ":"",” Has_alerts_off ”: true} & access_token =

    In the browser, it looks like this:
    Go to the Browser Menu, and then go to Add-ons.





    Next, click on the Facebook icon and turn on the Notifications function.





    Log in to your Facebook page.



    After logging into Facebook, we confirm permission to receive notifications.



    Done, you can receive notifications.

    It should be noted that the function was realized thanks to the close cooperation of UCWeb with Facebook. This is the first time a company gives access to online alerts in a third-party application. Such a partnership of companies proves UC Browser's strong commitment to its goal of creating a convenient browser for every day. The innovation will especially appeal to those who prefer to use one application to solve most tasks in the browser.

    PS We cannot but report another important news. More recently, UC Browser has reached 100 million active users per day (DAU) and has become the world's largest independent mobile browser: according to StatCounter, UC Browser has increased its market share in terms of page views to 11.1%. In Russia over the past year, the number of daily active users has almost tripled, and the number of page views (PV) by 125%. In January, UC Browser also became the No. 1 browser in the Russian Google Play and took third place among the TOP free applications.

    Also popular now: