Buddypress JSON API Plugin to show particular User activity - wordpress

Im using Buddypress JSON Api plugin, wanted to know how single User Activity can be displayed.
The function which is provided by BP JSON API is activity_get_activities() which display all user's activity through out the website.But i wanted to display only for single user.
For Example: http://websiteurl/api/buddypressread/activity_get_activities/?userid=1
In the above example, if i pass userid=1 then all the activity by the user 1 will be displayed not by all other user's

Related

Marketo API Open Rate & Unsubscribe status

Is there a field within the Marketo API field list that shows the status for each email address listed in a program? Like can it show ("Opened", "Bounced") etc etc. I know there is a field for bounced but I am curious about open rate etc.
How does the Unsubscribe status work with Marketo? The documentation is unclear in that it shows that it is system generated (with no explanation of HOW) and then there is an Unsubscribe Status field that is supposed to populate the email address if they personally unsubscribed? I had 2,000 contacts populate as unsubscribed but 0 populate in the Unsubscribe Status field. This is a bit worrisome given again NO documentation whatsoever in how it populates.
I tried utilizing all fields provided from Marketo on their documentation site but I feel like there has to be a field that shows the status of each email - otherwise how does it show on the dashboard when you log-in? https://developers.marketo.com/rest-api/lead-database/fields/list-of-standard-fields/

Is it possible to pass a special query parameter value to a WooCommerce product link?

I am looking to use WooCommerce in a bit of a strange way, and I'm wondering if there is any way to make this possible. Here's my desired workflow:
Step #1: From a different site subdomain, provide a link to a certain virtual product, but with a query parameter with a unique user id number.
Explanation: The user is at othersite.example.com, and they get a link to buy a product in a WooCommerce store set up with a wordpress site at https://example.com/product/virtual-product
However, this product will be a payment to unlock something on the othersite.example.com site which has its own user and authentication system. (Firebase)
Would it be possible to pass a user id from the othersite.example.com by way of a url query parameter and then have that included in the order info?
ie. From the othersite.example.com someone could be given a link to the product like this https://example.com/product/virtual-product?userid=00000000000000000, with 00000000000000000 being their user id at othersite.example.com.
Then if that userid query value could be included in the order, the following steps should be doable.
Step #2: Have a webhook that fires when the product is purchased, telling a server managing the users for othersite.example.com that the user with userid 00000000000000000 has made a successful purchase of that product.
Is there a way to accept custom values like this to the order? Or is this totally out of the scope of WooCommerce's functionality?
Thanks so much.
I believe that it can be done by using a redirection/link directly to the checkout page, like: "http://yourdomain.com/checkout/?add-to-cart=PRODUCTID&000000" (tested)
In the example, "checkout" stands for the name of your checkout page, "PRODUCTID" stands for the id of desired product, "000000" stands for the user id of redirected person in the other website.
Then you can add a hidden input field to the checkout page (into checkout form, so you will see this value in order) and using the URL you can assign the "000000" (user id) to the value of this field.
I hope that works. If you have any problems with implementation, you can ask me.
- Useful link for hidden input field addition: https://stackoverflow.com/a/42614905/11003615
- Useful link for getting value from current URL using JS: https://web-design-weekly.com/snippets/get-url-with-javascript/
- Useful link for getting value from current URL using PHP/Wordpress Core: https://wordpress.stackexchange.com/questions/274569/how-to-get-url-of-current-page-displayed
- Useful link (contains 4 parts) for adding a custom field to checkout & validating this field & saving this field to order fields & displaying the value of this field in order page: https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/#section-7

Gravityform registration add-on update user feed

I'm using gravity form registration add-on to create users with a specific role X, I used a (create user) feed for this and assigned it to this role. Now I need the current user with role X to Update his role to Z, I going to create a form with (update user feed). The issue I face is, I don't want the user to be updated automatically, I need the same manual activation function exist in (create user feed)
so the sequence going to be after the user X submit the form I going to show him a confirmation message telling him to wait until we validate his request

SendGrid query string from custom fields

I'm new to SendGrid and I was wondering if it was possible to create a URL query string with parameters values retrieved from the custom fields.
I want to create a campaign on which the customer will receive an email and when he/she clicks an image within the content it will redirect to another page and fill partially a survey with the values retrieved from the query.
Example
...
Thanks!

How do I get a twitter feed via a "username" query?

I currently have the following URL but it searchs for a keyword rather than just the users feed.
http://search.twitter.com/search.atom?q=from%3AUSERNAME
I want my users to be able to provide there username only and a feed be displayed on their profile.
What url should i use to obtain a users feed including old posts?
I think what you're looking for is:
http://twitter.com/statuses/user_timeline/%USERID%.rss
Where %USERID% is the ID of the user in question.
For example, the url to my own timeline is:
http://twitter.com/statuses/user_timeline/16979198.rss
with 16979198 being my user id number.
UPDATE
According to the Twitter API, you can also do the same with the users username as follows:
http://twitter.com/statuses/user_timeline/%USERNAME%.rss
Where %USERNAME% is the username of the person who's feed you'd like to view.
For example:
http://twitter.com/statuses/user_timeline/jamiedixon.rss
You can also replace the .rss portion of the link with other data types such as .json .atom
For further information on the Twitter API and Timelines, visit here:
http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-user_timeline

Resources