MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.25.0 is available! For more information about this release, check out this topic.

    MMM-Facebook

    Development
    1
    1
    377
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Ramez last edited by Ramez

      Greetings,
      almost 2 years since my last contribution here and thanks to Covid19 #stay_home am back again with lots of great ideas 🙂
      I want to create a facebook notifications module using this simple idea:
      1- login to mbasic.facebook.com through iframe (simple to user and more secure than typing account details in config.js plus I can’t find any API for that yet.
      2- parse the very basic html tags https://mbasic.facebook.com data and extract :

      <strong class="bj">Notifications< span aria-label="X new">(X)</span></strong>
      
      Messages< span aria-label="X unread">(X)</span>
      
      Friends< span aria-label="X new requests">(X)</span>
      
      <strong class="bj">Pages< span aria-label="XX new alerts">(XX)</span></strong>
      

      and so on…
      3- Create a Facebook like notification bar/icons with red counter bubble of parsed X number for each notification.
      4- regular check/update the page to get the new count and send.notification
      to the Alert module (playing some notify sound).
      the module config would be like that:

      session.login:"true",  /*set for the first time(login) only*/
      sound.notify:"true",   /*enable sound notification through local file (omx or vlc to play) or through send.notification Alert module if current X the notification number higher than old X */ 
      update.interval:"10", /* minutes maybe*/
      style:"2", /* kinda optional for view style 0 horizontal 1 vertical 2 themed...etc 
      

      The great news is all facebook notifications, messages, page messages, page notifications, friend request…etc are enclosed in simple html tags can be parsed easily also we can skip the iframe part here and login from any iframe module the login data will be saved to mirror cache… but the bad news is I don’t know how (very newbie in JS coding from scratch).
      Kindly help me creating such great and useful module I’ve seen some tutorials in parsing data using node.JS but it’s kinda hard to me

      Thanks in advance

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Enjoying MagicMirror? Please consider a donation!
      MagicMirror created by Michael Teeuw.
      Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy