Answer the question
In order to leave comments, you need to log in
The functionality of sending a single notification to a friend?
Hello!
I have a web html game in classmates, inside the game you can send gifts to friends. There was a need to send an alert to a friend together with a gift.
Looking through the Odnoklassniki API documentation, I came across the following methods:
FAPI.UI.showNotification, notifications.sendSimple and sdk.sendNote
FAPI.UI.showNotification is not very suitable, because there you can select several recipients, but I need exactly one.
notifications.sendSimple doesn't work either, because using this method, you cannot send a notification to a friend who is "not addicted to the game."
With the methods of the sdk group, there is a general mess. The documentation for sdk.init says "session denied", for sdk.getNotes and sdk.sendNote it says "session is required" and "The method is called using the sdkToken parameter from sdk.init". At the same time, this same sdkToken is not specified at all in the sdk.getNotes and sdk.sendNote request parameters. As a result, it is not at all clear how to use the methods of this group, but they are the best suited for implementing the notifications I need.
Would like some clarification on how to properly use the sdk group methods.
If suddenly there are some other methods of sending notifications to exactly one friend, I would like to get information about them.
Answer the question
In order to leave comments, you need to log in
So what's the problem to pass in the selected_uids in the showNotification of the desired user and he will already be pre-selected.
PS: SDK methods do not need to be used, they are intended for native applications, and even if you send a note using them via sendNote, it will not be visible on the portal.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question