MERN - Successfully POSTs a blog post to the DB but when I refresh the page it gives 404 - node.js

I am a beginner and followed a youtube video for creating a blog using MERN.
I am trying to configure it, but the problem is once a user clicks 'write' and adds a blog post to the homepage it will say 'not found' even though it successfully updates the DB, after replacing the window so I then have to back to the homepage and click on the post which is the exact same link the window is trying to replace, then for example once I refresh the post it gives me 404...
Is this a deployment issue? As I am currently only testing it on a free version of render, or is this a complete different problem? I will link the page now and it's just for testing purposes so it's not responsive on mobile or anything.
Thank you.
Website

Related

How can I know if the post are promoted in facebook using the GraphAPI?

I'm trying to use the graphAPI to see the comments in the posts on my facebook page and I have to know if the post is boosted/promoted. I tried to use the promotion_status, but is deprecated...
In the link https://developers.facebook.com/docs/graph-api/reference/v14.0/page/feed, is saying for me to search for is_eligible_for_promotion, but is not for the same thing :(

can't post on facebook with selenium (python)

I was able to post on Facebook some days ago with selenium(python)
I could find post text Box with this below method
driver.find_element_by_xpath("//textarea[#name='xhpc_message']")
but it seems Facebook has made some changes recently so it's not working anymore. and I am not even able to post any link with https or www anymore with
element.send_keys("https://.....");
I have tested manually It's working but not with selenium(python)
so any way to work around it, any help

Browser Said Invalid Request When I Tried to Access a Picture of Instagram

Recently, I wrote an app to synchronize photos in my Instagram to another platform. The GET /v1/users/self/media/recent?access_token=ACCESS_TOKEN result should contains the links to my pictures, like
https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/s640x640/e35/sh0.08/11330602_751572388302808_972254350_n.jpg,
and it went very well. But today after clicking the link, it told me Invalid Request. I'm not sure what happened to this cdn link. Any hints would be appreciated.

Share via FBSDKShareDialog ignores applink defined on target page

This has been driving me nuts all day:
I have an iOS app with a custom URL scheme defined, and am trying to share a link on FB which points to a page that has this scheme in its applink meta tags, so that tapping it should fire up my app.
Every little piece of it is working just fine. I can enter my URL scheme in safari on the phone and the browser launches my app. I have tested my webpage with the FB debug tool and there are no errors or warnings - it correctly identifies all the meta tags.
If I share the link using FB on the phone or on my laptop, all works fine.
HOWEVER, if I share the exact same link using FBSDKShareDialog, it does not work. It just opens the web page with the meta tags as if it was any regular web page.
Anyone has any idea why these two ways of sharing would be different? They look exactly the same otherwise.
If anyone else runs into this problem, here's the reply from FB:
When you share with mode automatic, the app does a fast app switch over to the FB app to show the native share dialog
The post is cached locally on the device, and it does not know about app links (since only Facebook server side knows about it)
When the user opens the FB, the user sees their cached story (with no app links behavior),
This doesn't manifest with the Web mode since the Facebook app needs
to pull from the server to get the post, in which case it has all the
app links info.
This is unlikely something that we'll fix. However, after a while, the
cache will expire, and Facebook app will re-pull the posts from the
servers, in which case the app link data will be available.
In order to test this, you can share the post on one device, and then
try clicking on the post from another device. The app links should
work at that point.
Which is kind of a lame response IMO - they parse the target page to build the preview, how hard would it be to remember the applink and use it?
There could be two possible issues:
Either the one told by #NJ, i.e. you are just trying to open the link in Facebook app, using the same device from which you posted the link.'
Solution - either open link in other device or cose and re-open your facebook app and do multiple refresh
Or You have some error in your meta tags. There is one important thing though, that Facebook never mentions, i.e. they cache the URL you provide.
So any one used the web link with meta tags the first time in Facebook, Whole meta tags will be cached, and you updated meta tags won't be parsed by facebook.
Solution
To get over with the issue, use below link
Facebook debug tool
Input your meta data included web page URL and
-click on show existing scrape information to find any error
Click on Fetch new scrape information for refreshing your URL on facebook. it will clear the cache for that URL in facebook server.

LIKES done by me on my own page don't show up anymore after making an app to post to my page's fanpage

I really hope someone can tell me more about what's going on, because I spent days searching the net and for the life of me can't say what is going on.
Here's what happened. I have a website 4nieuws.nl . On every article's page I put a like button using the Javascript SDK. All worked well. On facebook I created a fanpage for the website, facebook.com/4nieuws and every now and again I would copy an interesting article there. The like button and Javascript SDK on 4nieuws.nl uses the APP Id from an app I created specifically for that purpose.
Then I thought I might automate to publish the most popular articles on the fanpage using the PHP api. I set about getting the proper authorization key using the sequence explained on this page: http://www.typeoneerror.com/articles/post/permanent-facebook-sessions-and-posting-as-a-page
For this to work I authorized the previously mentioned app to publish on the facebook fanpages that I am admin of. And this works.
Now for the strange part. Ever since I authorized the app, if I go to 4nieuws.nl and like a page, or even 'post to facebook', the button shows 1 more like. But the like message never shows up on my personal wall. My wife, logged in to her own facebook account, gets a notification that I liked a page, but when she clicks the notification she is sent to a Facebook 404 page. When I subsequently reload the article, my 'like' is not there anymore.
Has anyone ever come across something like this ? I'm a bit anxious because I am not sure if other peoples likes on 4nieuws.nl are working as it should. I do see likes on pages but have no idea if those likes are actually registering on peoples walls.
Any help greatly appreciated.

Resources