I am trying to get Twitter consumer key for a wordpress website. I understand I have to create an application, but want to be sure this is not going to affect my client's twitter account. I just simply want to get a twitter count for her website so I guess I don't understand why I have to create an application? Can anyone enlighten me? What is the purpose of the application? Thanks.
It is not directly related to WordPress. Creating a Twittter application won't affect your account. You just gotta be careful not to share the secret keys.
Here's a very thorough answer about using the new Twitter 1.1 API
Simplest PHP example for retrieving user_timeline with Twitter API version 1.1
If you check the documentation the Get Users method returns the number of followers:
https://dev.twitter.com/docs/api/1/get/users/show
Cheers.
Related
I have a question about integration e.g. Woocommerce with external app.
What is the best and safe method to accomplish this goal?
Woocommerce has REST API but it might be quite vulnerable and will not show anything (products etc.) to non logged user(which is understandable).
Only safe idea that's comes to my mind is creating scripts inside WordPress and access them via AJAX but I'm worrying about performance of this method.
Maybe there is a right way that I'm not familiar with?
For that purpose, you should create an API from scratch of the wordpress database. wordpress databse has all of you need in a good way and only some php codes needed to create and execute the API. then in you app with AJAX you should access that.
this link may help you:
https://developer.okta.com/blog/2019/03/08/simple-rest-api-php
The right way is likely creating your own API if you don't want to use Woocommence's one. That means you make a plan of what you need to expose, all the routes and start building the API. I warmly recommend the book by Phil Sturgeon - Build APIs you won't hate. The author is also a co-founder of https://phptherightway.com/ so it's quite reputable.
We are currently trying to use Concrete5 to create an internal Intranet for the company I work for (this is a web-based server). What we would like to do is allow our employees to sign in using their Gmail and be able to see their personal calendars amongst other things on sign in.
I would like the employees to just sign in once, get automatically asked for granting permissions during the login, and then be taken to the home page.
I'm having trouble figure out how to modify Concrete5's built-in Google login to request these scopes. I am pretty bare-bones in my PHP knowledge and no amount of Google searching has really answered my question specifically for modifying the authentication for Concrete5.
So to sum up my question:
How would someone go about modifying Concrete5's Google authentication to request additional permissions? We are using 5.8.3 and are always updating as necessary, so modifying the core is not really an option to prevent overwrites in the future.
The best way to do that would be to copy the core Google login system to create a new one. You could call it Google Custom or anything you want. You could include it in the folder application/authentication or in a package, with the appropriate modifications.
But to be honest, if you're bare-bones in your PHP knowledge, it all might be a bit too difficult to achieve
I wonder how can I remove a post from my profile and company using API in my system. What parameter should I spend? Anyone have any idea?
There are no APIs available for removal of a LinkedIn share. It has to be done manually through the web/mobile UI.
I am working on a website that needs data from "wunderground" therefore they have issued me with an API Key, i needed to know how i integrate the API key into the existing word press site. That the main problem i am facing, or are there existing plugins to assist with this?
Thanks
There is a plugin available:
https://wordpress.org/plugins/wunderground/faq/
From the plugin page:
Do I need a Wunderground account?
Weather Underground has been very
gracious and has provided the plugin with free data - you don't need
your own account. If you want to use Wunderground data in your own
application, register for a Weather Underground API account.
I have Have WP API and OAuth1 plugins installed for my python frontend to access posts in wordpress. With CLI wp oauth add I have generated secret and key also. But am stuck on how to proceed further. I can check api responses via chrome advanced REST client.
I get proper JSON responses from requests like GET http://mylocal.site/wp-json/posts
But I want to add authentication. Read numerous docs from api and oauth...but nowhere a proper work flow. Please shed some light who have worked with these already.
Thanks.
I got this working following the base https://github.com/WP-API/OAuth1