My app doesn't receive Foursquare push notifications - push-notification

I have a problem with Foursquare API push notification.
I'm using foursquare real time push notification, but it's quite hard to test it. I can send test pushes to my Web application, and everything seems to work fine, the status is OK, and I see received info in my logs. But push notifications from the real account never come, there is no info in the logs.
I use the "Push checkins at venues managed by this app's users" type of pushes. I have registered my own foursquare venue with type home (private location), but when I check-in to this location, I don't receive any push.
Hovewer, when I switch push type to "Push checkins by this app's users", it works fine.
I am confused — why don't I receive pushes for my home location? Is it not supported?

Users do not "manage" their home venues. A managed venue refers specifically to businesses that have been claimed by their owners. If you would like to receive push notifications on home check-ins, you should configure your app to receive push notifications from all check-ins.

You can "manage" a home-venue. But you have to "claim" it is yours, as you would have to for a business-venue.
On the details page of your venue is a link at the lower right "claim it now". Click it and finish all steps. On the last step you either pay $20 to be verified immediately or you choose that foursquare sends you a postcard/letter via traditional mail (3-4 weeks) with a verification code. If you use the latter, make sure the address of the venue that foursquare will use can be found by the postman.
After you have successfully claimed your venue foursquare will send you push-notifications.
I just did that recently see a video of my Party-Greeting-Machine here. There is also a german blogpost about the small experiment (with some code).

Related

How to build in app notification service?

I'm learning backend and API development and trying to understand how to implement some features from scratch without using any paid third party service.
I want to understand this concept from design as well as implementation pov. Please share if you have any resources where I can learn how to code the below service.
How to build in app notification service like one of these from scratch ?
Notification when user likes or comments on a post (Instagram, Twitter)
Notification when someone views your profile (Linkedin)
Notication when a channel you are subscribed to uploads a video (Youtube)
These are different from push notifications like
Notification when someone sends you a message (All chat apps)
Live status via notification of your delivery (Food delivery apps)
Push notifications need not be stored permanently in any database but what happens with in app notifications? How to build such service which is scalable too.
One possible solution I could think of is this, for notification on post like
User A has made a post.
User B likes their post.
From likePost API emit an event which will notify User A that User B liked their post, listen for these real time events on client side. This can be done via sockets.
Do not store any notifications in database, just update the notifications in UI on that event emitted by likePost API or listen to real time changes in likes attribute of a User's Post table (is this possible?) and update UI.
In UI just show all such notifications by fetching from likes and comments table.
But I wonder how scalable is this approach.
I searched but couldn't find any good resources regarding this, so please if anyone could explain this or provide link to any blog or videos it will be helpful.
(P.s. I'm an undergrad student and don't have experience in system design and architectures, just started learning about these so just curious)
Thanks.
apps like Facebook, Instagram and linkedIn provides web hook of notifications. Webhooks allow you to receive real-time HTTP notifications for subscribed events. This functionality is only available for applications with an approved use case for webhooks. Webhhook received as a notification when user comment on your post or like your post, a web hook can be used to retrieve the information of post, comment and commentor etc.
I am attaching a reference of LinkedIn web-hook.
https://learn.microsoft.com/en-us/linkedin/shared/api-guide/webhook-validation

Does long-polling work always even if the user switches app?

I have an application which sends notification to its subscribers through telegram.
For someone to subscribe, he needs to add his request in my website and after that, to identify his self, he needs to start a conversation with my bot using a secret code generated by the server.
For example, whenever he completes his request he should click a button which leads him out of my website and to telegram's chat (using ), in the background, the website is making long-pool requests to the server to check whether the server received a notification from telegram with this secret code abcd and to get the chat id assosiated with the request so it could store the request with this specific chat id.
The process seems to work just fine for many users, but for minor amount of users it's not working, they are starting a conversation with my bot but not getting any feedback about a success. It seems as whenever they leave the website (or the browser) and follow the path of the link (https://t.me/mybot?start=abcd) straight to telegram app, the long-pool is being stopped.does that happen sometimes when long-polling?

Best way to utilise push notifications when app goes into background

I am a React Native developer currently working on a vehicle tracking app.
We want to develop a feature that allows users to exit the app, but continually be updated in the form of notifications when the vehicle moves (on average every 60 seconds).
I have been tasked with coming up the best way of integrating this. Our app already has push notifications set up with Firebase and we do use this to push out generic messages to the app.
My thinking is as follows:
When a user begins tracking a vehicle, the app should subscribe to a Firebase topic identified as the vehicle's registration. On the server side, each time an update comes in for a vehicle, send out a Firebase notification to that vehicle registration's topic, and then any users tracking it will be updated. When a user returns to the app and presses 'Stop tracking', the app unsubscribes from the topic.
In theory I think this would work. The reason I'm posting is I'm not sure it's the most efficient way. Our server received updates for over 1,000 vehicles every minute.
Any help/ideas would be gratefully received!

How to add "subscribe button" in facebook messenger bot?

I need to add a button (subscription ) in my messenger bot through which users can subscribe. and after that bot will automatically send latest post to the users at the specific time.
I was going through documentation but i am unable to find any proper documentation for it.
Can anybody please help regarding that?
Facebook don't provide a mechanism to manage subscriptions. It's up to you as a developer to choose how to implement this - for example using a button with a payload to confirm that the user wants to opt in.
You could perhaps put an Opt Out option in your persistent menu and listen for the relevant payload and unsubscribe the user.
Facebook have published some documentation about this, explaining how they expect subscription messaging to be triggered:
Person sends a message to a business or clicks on a call to action button within Messenger to request subscription messaging
Person requests subscription messaging from a business via a Send to Messenger plugin
Person signs up for SMS alerts
See the full page of documentation at https://developers.facebook.com/docs/messenger-platform/policy-overview#messaging_types for more details on their expectation

Unable to find Subscription Key for Microsoft Cognitive Services

I need to work on Microsoft Cognitive Services (Face API). I downloaded the code from https://github.com/Microsoft/Cognitive-face-android. Now I am unable to generate the Subscription Key for it.
No matter whatever I do I get stuck in this page
From where else I can find the Subscription Key.
Thanks
The interface you are using is for testing-purposes. Consequently, it is not meant to be used for more than a month.
Here's how you can generate an API key the proper way:
Newer Edit: The Azure interface has changed since this guide was written. It hasn't changed that much, so leave me a comment if this guide is broken.
The largest change I have seen is that Bing Search API can now be located directly using the "+ New" form shown in Part A/Step 3. (aka, don't search for "cognitive services")
Edit: There is now another piece of documentation half-way down entitled "Part B: Adding a Credit Card for Pay-As-You-Go via the Azure Portal." If you have not already set up your payment method on portal.azure.com, you will get stuck at Part A/step 5.
process.
Part A:
Go to https://portal.azure.com and sign in with your credentials.
(Optional) Check to make sure you have an active Pay-As-You-Go(PAYG) subscription. Click the "More services" arrow and type subscriptions into the form that appears. Click into Subscriptions and make sure you see an entry here.**
If you're sure you have an active PAYG acct, make sure you're on the dashboard and press the green "+ New" button and start to type Cognitive Services. As you finish typing it should be your only option.
Once you've clicked the "Cognitive Services APIs" suggestion you will be brought to the following page. Click the green brain.
You'll be given a description of Cognitive services and you'll see a create button at the bottom. Press that.
The "Create" pane will pop up. Fill this out. CHECK THE PIN TO DASHBOARD BOX FIRST SO YOU DON'T FORGET (Note: If you do not have an active PAYG subscription you will see an error instead of the "Create" pane on the right-side of the image below.)
When you press the green-explosion from the picture above you will see the following icon:
This is what you want. When you've completed the form from the previous picture, press "Create" below the "pin to dashboard" box.
When you've created the subscription successfully, you'll get a little message that things are validated and your service is deploying. You should be on the dashboard now and should see a little tessellating box if you pressed pin to dashboard. Soon it will be complete and vuala!You'll see something similar to the following image. Press the "keys" button on your new service.
** If you're told that "You don't have any active subscriptions," you'll need to click the white "Add+" button and create a PAYG subscription. You will need a credit-card and non-VoIP phone for this step.
Part B:
Adding a Credit Card for Pay-As-You-Go via the Azure Portal
This portion of the process is necessary if you have never used portal.azure.com before and/or don't have an active payment-subscription on it.
For this process you will need: A valid credit-card**, a non-voip telephone for human-verification, >= $3 USD for the lowest API tier.
TO AVOID POTENTIAL HEADACHES; DO NOT USE GOOGLE CHROME FOR THESE STEPS. If you are on a Windows 10 Machine use Edge in InPrivate mode as your browser. Otherwise, firefox private-browsing is a decent alternative.
Follow steps 1 & 2 from the guide above to navigate to the Subscriptions pane. Underneath the circled "+ Add" button, you should see a message telling you there are "No subscriptions in xxxxx(Default Diretory) directory." Click the "+ Add" button.
You will be taken to the URL https://account.windowsazure.com/signup?showCatalog=True, and you should see the following screen:
As the picture above indicates. Select Pay-as-you-go (PAYG) unless you want to go off-guide. You'll be brought here & will need to fill out the 3 sections. Your card won't be charged during this process.
Once you complete the 3 steps denoted in the image above, you'll be taken to a page which asks you to wait for ~4 mins while your subscription is getting ready & you'll see that fun little animation of spinning half-circles. Eventually you'll be presented with a button which is labeled "Start Managing my Services. Which will take you back to the dashboard at portal.azure.com.
From the dashboard, Find the "Subscriptions" pane again, and this time you should see something similar to the following.
You now have a payment method with which to purchase your API subscription. From here you can resume at Step 3 of Creating an API Endpoint & Accessing Your Keys aka the first half of this guide.
** Your credit-card must have a billing address located in the country which your Microsoft username/password combo was created in.
For the subscription key, you have to create the cognitive service account in azure portal. Follow the following steps:
If you have not done so already, you will need to sign up for the Face API (preview) service.
Go to the Azure Portal at http://portal.azure.com/ and sign in with your Azure account.
Click on + New.
Select the Intelligence option.
Select the Cognitive Services APIs product. This product will allow you to start a subscription for any of the cognitive services APIs (Face, Text Analytics, Computer Vision, etc.). Today we will focus on the Face API (preview) API.
Enter a Resource name for your Face API subscription. (For instance: "MyFaceAPI"). This name should not have any spaces in it.
On API type, select .
On Pricing tier, you can select a plan. You may select the Free tier for 10,000 transactions/month. This is a free plan, so it is a good way to start trying the system. Once you go to production, we recommend you consider your request volume and change the plan type accordingly.
Select a Resource Group, or create a new one if you don't have one already.
You may change other elements in the Create dialog. We should point out that the resource provider today is only supported from United States data centers. Once you are done with any selections, click Create.
Wait a few minutes for the resource to be deployed. Once it is deployed, you can go to the Keys section in the Settings blade where you will be provided a primary and secondary key to use the API. Copy the primary key, as you'll need it when creating your first model.
Hope this help.
REF:
See this image for the azure portal registration

Resources